35 lines
1.5 KiB
JavaScript
35 lines
1.5 KiB
JavaScript
import assert from 'node:assert/strict'
|
|
import { readFileSync } from 'node:fs'
|
|
import test from 'node:test'
|
|
|
|
const runner = readFileSync(new URL('./phase4-development-frontend-acceptance.mjs', import.meta.url), 'utf8')
|
|
const suite = readFileSync(new URL('./phase4-development-frontend.acceptance.ts', import.meta.url), 'utf8')
|
|
|
|
test('development runner requires an explicit development environment and gateways', () => {
|
|
assert.match(runner, /--environment/)
|
|
assert.match(runner, /environment !== 'development'/)
|
|
assert.match(runner, /--gateway/)
|
|
assert.match(runner, /--overseas-gateway/)
|
|
assert.match(runner, /shell: process\.platform === 'win32'/)
|
|
assert.match(runner, /if \(result\.error\) throw result\.error/)
|
|
assert.doesNotMatch(runner, /ADMIN_ACCEPTANCE_PASSWORD\s*[:=]\s*['"][^'"]+['"]/)
|
|
})
|
|
|
|
test('live suite uses production auth clients and domain adapters', () => {
|
|
assert.match(suite, /useAuthStore/)
|
|
assert.match(suite, /clearOverseasAccessToken/)
|
|
assert.match(suite, /createQuote/)
|
|
assert.match(suite, /createUsTruckOrder/)
|
|
assert.match(suite, /createLocalLooseboardOrder/)
|
|
assert.match(suite, /listLastMileOrders/)
|
|
assert.match(suite, /listDispatchCandidates/)
|
|
assert.match(suite, /listCarrierScheduleQueries/)
|
|
})
|
|
|
|
test('live suite owns marker resources and redacts credentials from trace reports', () => {
|
|
assert.match(suite, /ADMIN-FRONT-P4-/)
|
|
assert.match(suite, /password\|token\|authorization/i)
|
|
assert.match(suite, /createdResources/)
|
|
assert.match(suite, /coverageGaps/)
|
|
})
|