test(fba): preserve verified fleet and fulfillment acceptance workflows
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
import test from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { customsRetentionDigest, verifyTaxCustomsAfterShipEdit } from './phase3-port-schedules.mjs'
|
||||
import { customsRetentionDigest, verifyTaxCustomsAfterShipEdit, portScheduleCustomerScope } from './phase3-port-schedules.mjs'
|
||||
|
||||
test('public booking null scope becomes platform zero; positive IDs retain exact precision', () => {
|
||||
assert.equal(portScheduleCustomerScope(null), '0')
|
||||
assert.equal(portScheduleCustomerScope(undefined), '0')
|
||||
assert.equal(portScheduleCustomerScope('2105227486329671682'), '2105227486329671682')
|
||||
assert.equal(portScheduleCustomerScope(123), '123')
|
||||
for (const invalid of ['', '0', 0, '-1', 'customer']) {
|
||||
assert.throws(() => portScheduleCustomerScope(invalid), /null or a positive ID/)
|
||||
}
|
||||
})
|
||||
|
||||
test('customs retention digest includes documents, receipt versions, confirmations and completion facts', () => {
|
||||
const before = { status: 'COMPLETED', documents: [{ fileId: '1', tenantId: 'A', version: 2 }],
|
||||
|
||||
Reference in New Issue
Block a user