2026-08-25 00:24:43 +08:00
|
|
|
import assert from 'node:assert/strict'
|
|
|
|
|
import { readFileSync } from 'node:fs'
|
|
|
|
|
import test from 'node:test'
|
|
|
|
|
|
|
|
|
|
const source = readFileSync(new URL('./master-data.mjs', import.meta.url), 'utf8')
|
|
|
|
|
|
|
|
|
|
test('non-versioned master data stays explicit without making the full gate permanently red', () => {
|
|
|
|
|
assert.match(source, /documented-non-versioned-contract/)
|
|
|
|
|
assert.match(source, /\{ blocking: false \}/)
|
|
|
|
|
assert.match(source, /非版本化主数据不伪造旧version请求/)
|
|
|
|
|
assert.match(source, /phase4-overseas-master-data/)
|
|
|
|
|
})
|
2026-09-09 20:36:53 +08:00
|
|
|
|
|
|
|
|
test('warehouse import fixture tracks the current version two template and internal code column', () => {
|
|
|
|
|
assert.match(source, /仓库编码\*', '内部编号', '仓库名称/)
|
|
|
|
|
assert.match(source, /sheet: '仓库', templateVersion: '2'/)
|
|
|
|
|
assert.match(source, /xlsxBytes\(fixture\.headers, fixture\.values, fixture\.sheet, fixture\.templateVersion\)/)
|
|
|
|
|
})
|