test(phase22): align runner export/guard parity for core token suite
This commit is contained in:
@@ -2175,3 +2175,29 @@ Validation:
|
||||
Follow-ups:
|
||||
|
||||
- Optional next bounded slice: add this phase22 suite to any aggregate test runner used in CI if/when phase-level suites are centrally orchestrated.
|
||||
|
||||
---
|
||||
|
||||
### CL-062: TASK22260 next slice — phase22 runner export guard parity (bounded test-harness consistency)
|
||||
|
||||
date: 2026-03-25
|
||||
author: Cline
|
||||
scope: `tests/phase22/core-token-behaviour.test.cjs`
|
||||
type: change
|
||||
rationale: Continue bounded test-hardening by aligning phase22 test entry behavior with established suite conventions so it can be executed both directly and from aggregate runners.
|
||||
impact: Improves test harness composability and reduces accidental double-execution risk when importing phase22 test suites.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- Updated `tests/phase22/core-token-behaviour.test.cjs` to export `run` and add `require.main === module` guard.
|
||||
- Preserved direct CLI execution behavior while enabling safe module import by aggregate runners.
|
||||
|
||||
Validation:
|
||||
|
||||
- `node tests/phase22/core-token-behaviour.test.cjs` -> pass (2/2)
|
||||
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors)
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- Optional next bounded slice: add a dedicated `tests/phase22/index.test.cjs` aggregate entrypoint if additional phase22 suites are introduced.
|
||||
|
||||
Reference in New Issue
Block a user