selftest.html only imports; each lane owns js/tests/<letter>.test.js. Five lanes sharing one selftest.html would be the single guaranteed merge conflict in the repo, so the stubs are pre-created with each lane's PLAN3D asserts written into the header. No rAF anywhere: it's throttled in a hidden tab, so a rAF-driven selftest would pass only while you watch it. fixedLoop() drives time instead. Lane A's suite covers the §5-A acceptance criteria, including "camera never clips through house" — stated as the underlying invariant (no solid between the player's head and the camera) so it survives Lane E swapping the house GLB. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
1.1 KiB
JavaScript
27 lines
1.1 KiB
JavaScript
/**
|
|
* Lane D selftests — player state machine and interactions.
|
|
*
|
|
* Lane D owns this file. Lane A pre-created it so adding your suite never means
|
|
* editing selftest.html.
|
|
*
|
|
* The asserts PLAN3D §5-D asks for, once player.js lands:
|
|
* 1. anim state machine table test — every state reachable, none stuck
|
|
* (idle/walk/run + one-shot interact + knockdown → get-up).
|
|
* 2. interact radius respects the busy and carrying flags.
|
|
*
|
|
* Note for integration: main.js currently drives a placeholder capsule that
|
|
* satisfies the Player contract ({pos, carrying, busy, update}). When player.js
|
|
* lands, Lane A swaps the factory call in boot() and deletes the placeholder —
|
|
* you shouldn't need to touch main.js yourself. Ping THREADS.md when you're
|
|
* ready and Lane A will do the swap.
|
|
*
|
|
* Useful imports:
|
|
* import { FIXED_DT, createStubWind } from '../contracts.js';
|
|
* import { assert, assertEq, fixedLoop } from '../testkit.js';
|
|
*/
|
|
|
|
/** @param {import('../testkit.js').Suite} t */
|
|
export default function run(t) {
|
|
t.skip('player.js not landed yet — Lane D');
|
|
}
|