Golden Path Test Author
Critical Game Flow
MainMenu → Overworld → PreGig → Gig (rhythm game) → PostGig → (loop or GameOver)
Key Files
- •
src/scenes/MainMenu.jsx→src/scenes/Overworld.jsx→src/scenes/PreGig.jsx→src/scenes/Gig.jsx→src/scenes/PostGig.jsx - •
src/scenes/GameOver.jsx— end state - •
src/context/gameReducer.js— state transitions driven byADVANCE_DAY,APPLY_EVENT_DELTA, etc. - •
src/context/actionCreators.js— action creators for state changes - •
src/context/initialState.js— starting state for test setup - •
tests/— existing tests usenode:test+node:assert/strict
Workflow
- •Identify the critical flow: MainMenu → Overworld → PreGig → Gig → PostGig.
- •Set up test state using
initialState.jsand action creators. - •Write tests using
node:testandnode:assert/strict(the project's test framework). - •Keep tests deterministic — mock randomness in
eventEngine.jsandmapGenerator.js. - •Focus on state transitions: verify reducer handles each scene transition correctly.
- •Run
npm run testand report results.
Output
- •Provide test files in
tests/and brief rationale for each test case.
Related Skills
- •
state-safety-action-creator-guard— ensures state invariants hold across the golden path - •
game-balancing-assistant— balance changes need golden path regression tests