Files
baiyue-firstleg/scripts/admin-test-phone-fixture-contract.test.mjs
T

13 lines
573 B
JavaScript
Raw Normal View History

2026-09-03 18:13:00 +08:00
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import test from 'node:test'
const source = readFileSync(new URL('./admin-test-env-acceptance.mjs', import.meta.url), 'utf8')
2026-09-04 17:17:08 +08:00
test('admin acceptance phone fixture resolves a currently available deterministic candidate', () => {
assert.match(source, /const seed = `\$\{this\.marker\}:\$\{this\.phoneSequence\}:\$\{attempt\}`/)
assert.match(source, /administrator-phone-availability\?phone=/)
assert.match(source, /attempt < 100/)
2026-09-03 18:13:00 +08:00
assert.doesNotMatch(source, /phoneSequence % 10\)/)
})