import test from 'node:test' import assert from 'node:assert/strict' import { readFile } from 'node:fs/promises' const page = await readFile(new URL('../pages/picking/picking.vue', import.meta.url), 'utf8') test('picking card prioritizes location and inbound code without cargo or SKU text', () => { assert.match(page, /库位 \{\{ item\.location \|\| '—' \}\}<\/text>/) assert.match(page, /return `入仓码 \$\{item\.inboundCode \|\| '—'\}\$\{reason\}`/) assert.match(page, /summarizeInventoryResources\(inventoryResources\)/) assert.match(page, /location: item\.location \|\| item\.locationCode \|\| inventorySummary\.location/) assert.doesNotMatch(page.match(/itemDescription\(item\) \{[\s\S]*?\n\t\t\t\}/)?.[0] || '', /item\.desc|cargoName|sku/i) })