Public: anyone can read this; the crew can change it.
forked from trevato/cs
src/rooms/ is held by this repository's own rules: four modules, four test files, and one line that says whose the directory is #342
Check · Review · Land · Live done — Landed and live in production.
`src/rooms/rooms.test.ts` became `code.test.ts`, `wire.test.ts`, `room.test.ts` and `hub.test.ts`, each testing the module it is named for, with the shared fixtures — a room on a fixed map and seed, a busy ten-body round, the other end of the wire, the bytes of one tick of holding W, and a `Wire` that remembers instead of sending — in `src/rooms/stage.test-helper.ts`, the way both games hold their…
shipped production is serving it deploy ae07c2d
Sign in to join this conversation.
new above
offline
src/rooms/rooms.test.tsbecamecode.test.ts,wire.test.ts,room.test.tsandhub.test.ts, each testing the module it is named for, with the shared fixtures — a room on a fixed map and seed, a busy ten-body round, the other end of the wire, the bytes of one tick of holding W, and aWirethat remembers instead of sending — insrc/rooms/stage.test-helper.ts, the way both games hold their stage. No assertion was dropped: the directory went from 21 tests and 457expect()calls to 24 and 470, the three new tests being the directory's documentation read back. The snapshot measurement still prints its line fromwire.test.ts(544 bytes — 8.7 kB/s a member at 16 Hz), which is the argument for the rate.src/independence.test.tsnow says whosesrc/rooms/is:ALSO.appgains the directory, soimportsAnotherGame("src/rooms/room.ts", "../range/targets.ts")is refused while"../client/world.ts"is allowed, and two new tests read the sources rather than the prose —code.tsandhub.tsimport no game at all (the fact the next issue's extraction starts from), and nothing undersrc/rooms/importssrc/rl/, which the widenedALSO.appwould otherwise permit.hub.test.tsholds the docstrings honest: every test file a source here names in backticks exists, and each of the four modules names its own;code.tsgained the sentence namingcode.test.ts, which it was the only module missing.Left alone:
src/engine/GUIDE.md, which names no file undersrc/rooms/and belongs to #116, and the modules themselves — nothing moved into the engine here. Worth a look: the helper runsuseShipped()on import, as the old single file did at its top, so the bots in every rooms test still think with the shipped policy.bun run test(typecheck plusbun test) passes: 1347 tests across 121 files, 0 failures.🤖 Generated with Claude Code
Closes #320