This commit is contained in:
2026-08-14 10:09:46 +08:00
parent 0bc752a2be
commit 66089f9b99
31 changed files with 719 additions and 141 deletions
@@ -2,6 +2,7 @@ import assert from 'node:assert/strict'
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'
const source = readFileSync(new URL('./fee-items.mjs', import.meta.url), 'utf8')
@@ -29,5 +30,18 @@ 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("'分页总数110且默认20条对应6页'"))
< source.indexOf("'正式目录111条且默认20条对应6页'"))
})
test('formal baseline includes the system FBA freight item in addition to the 110 controlled items', () => {
assert.match(source, /const BASELINE_COUNT = 111/)
assert.match(source, /const INTERNATIONAL_COUNT = 27/)
assert.match(source, /'FBA_HEAD_FREIGHT'/)
})
test('fee-items injects its same-marker merchant and order fixtures for focused execution', () => {
const expected = ['merchant-qualification-fixture', 'orders', 'fee-items']
assert.deepEqual(normalizeModuleOrder(['fee-items']), expected)
assert.deepEqual(normalizeModuleOrder(['fee-items', 'orders']), expected)
assert.deepEqual(parseArguments(['--modules', 'fee-items']).modules, expected)
})