12 lines
600 B
JavaScript
12 lines
600 B
JavaScript
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('missing picking location does not render an empty badge or dangling separator', () => {
|
|
assert.match(page, /<text v-if="item\.location" class="pick-item-location">\{\{ item\.location \}\}<\/text>/)
|
|
assert.match(page, /item\.location \? `\$\{item\.sku\} · \$\{item\.location\}` : item\.sku/)
|
|
assert.doesNotMatch(page, /<text class="pick-item-location">\{\{ item\.location \}\}/)
|
|
})
|