test(acceptance): align current gateway contracts
This commit is contained in:
@@ -8,14 +8,15 @@ import { normalizeModuleOrder } from '../admin-test-env-acceptance.mjs'
|
||||
const source = readFileSync(new URL('./phase3-container-documents.mjs', import.meta.url), 'utf8')
|
||||
const entry = readFileSync(new URL('../admin-test-env-acceptance.mjs', import.meta.url), 'utf8')
|
||||
|
||||
test('four canonical container documents are frozen and use only public platform APIs', () => {
|
||||
test('three generic container documents are frozen and customs stays on customs-v1', () => {
|
||||
assert.deepEqual(DOCUMENT_TYPES, [
|
||||
'DESTINATION_CLEARANCE', 'CUSTOMS_DECLARATION', 'DELIVERY_ORDER', 'PICKUP_ORDER',
|
||||
'DESTINATION_CLEARANCE', 'DELIVERY_ORDER', 'PICKUP_ORDER',
|
||||
])
|
||||
for (const token of [
|
||||
'/clearance/document/upload', '/clearance/complete', '/customs/document/upload', '/customs/complete',
|
||||
'/clearance/document/upload', '/clearance/complete',
|
||||
'/documents/${type}/upload', '/overview', 'requestMultipart', 'Idempotency-Key',
|
||||
]) assert.ok(source.includes(token), token)
|
||||
assert.doesNotMatch(source, /customs\/document|CUSTOMS_DECLARATION/)
|
||||
assert.doesNotMatch(source, /\/internal\/|https?:\/\/|process\.env|\bfetch\s*\(/)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user