13 lines
573 B
JavaScript
13 lines
573 B
JavaScript
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')
|
|
|
|
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/)
|
|
assert.doesNotMatch(source, /phoneSequence % 10\)/)
|
|
})
|