Files
baiyue-firstleg/scripts/admin-test-env-modules/master-data-version-contract.test.mjs
T

19 lines
895 B
JavaScript

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/)
})
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\)/)
})