优化
This commit is contained in:
@@ -3,7 +3,7 @@ import { readFileSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
|
||||
import { normalizeModuleOrder, parseArguments } from '../admin-test-env-acceptance.mjs'
|
||||
import { cleanupSucceeded, isAcceptanceFeeItem } from './fee-items.mjs'
|
||||
import { cleanupSucceeded, isAcceptanceFeeItem, formalFeeItems } from './fee-items.mjs'
|
||||
|
||||
const source = readFileSync(new URL('./fee-items.mjs', import.meta.url), 'utf8')
|
||||
|
||||
@@ -31,7 +31,15 @@ test('stale cleanup only recognizes the acceptance-owned code and name pair', ()
|
||||
|
||||
test('baseline checks run only after stale acceptance cleanup', () => {
|
||||
assert.ok(source.indexOf('cleanupStaleAcceptanceItems(context)')
|
||||
< source.indexOf("'正式目录112条且默认20条对应6页'"))
|
||||
< source.indexOf("'全部目录默认20条分页与完整列表一致'"))
|
||||
})
|
||||
|
||||
test('正式费用按编码识别,扩展停用项目保留且不掩盖缺失正式编码', () => {
|
||||
const rows = [{ feeCode: 'FBA_HEAD_FREIGHT' }, { feeCode: 'FEE_TYPE_001' },
|
||||
{ feeCode: 'PRIVATE_LAST_MILE_DELIVERY' }, { feeCode: 'FEE_EXT_OTHER', status: 'DISABLED' }]
|
||||
assert.deepEqual(formalFeeItems(rows), rows.slice(0, 3))
|
||||
assert.equal(rows.length, 4)
|
||||
assert.equal(formalFeeItems([{ feeCode: 'FEE_TYPE_111' }]).length, 0)
|
||||
})
|
||||
|
||||
test('formal baseline includes both system fee items in addition to the 110 controlled items', () => {
|
||||
|
||||
Reference in New Issue
Block a user