优化
This commit is contained in:
@@ -5,7 +5,7 @@ import test from 'node:test'
|
||||
import { oceanBookingDraft, oceanBookingDraftWithoutCustomer, publishPlatformLogisticsChannels, resolveOceanBookingAgent, resolveOceanBookingMaster } from './ocean-booking-fixture.mjs'
|
||||
|
||||
const read = (name) => readFileSync(new URL(name, import.meta.url), 'utf8')
|
||||
const master = { customerId: '21', customerName: 'IT 测试客户', channelCode: 'SEA-US', channelName: '美西海运', warehouseId: '41', warehouseName: '深圳仓' }
|
||||
const master = { customerId: '21', customerName: 'IT 测试客户', channelCode: 'MATSON_CLX_TRUCK', channelName: '美森正班海卡', warehouseId: '41', warehouseName: '深圳仓' }
|
||||
|
||||
test('fixture resolves current-marker customer channel and warehouse without inventing data', async () => {
|
||||
const steps = []
|
||||
@@ -22,6 +22,7 @@ test('fixture resolves current-marker customer channel and warehouse without inv
|
||||
test('shared DRAFT uses requirements and never registers a real container number', () => {
|
||||
const draft = oceanBookingDraft({ marker: 'ADMIN-RUN-3' }, '3', master)
|
||||
assert.equal(draft.channelName, undefined)
|
||||
assert.equal(draft.channelCode, 'MATSON_CLX')
|
||||
assert.equal(draft.warehouseName, undefined)
|
||||
assert.deepEqual(draft.containerRequirements, [{ containerType: '40HQ', containerKind: 'FCL', quantity: 1, capacityCbm: 68, maxWeightKg: 19500 }])
|
||||
assert.equal(Object.hasOwn(draft, 'containers'), false)
|
||||
|
||||
Reference in New Issue
Block a user