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 #320
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
forked from trevato/cs
Multiplayer landed as four modules under
src/rooms/with one 507-linerooms.test.ts, and their docstrings already name the files they expect:code.tsis tested by "code.test.ts", the hub says "hub.test.tsruns a hub with five members", the room says "room.test.tsplays a whole round", the wire says "every claim inwire.test.ts". None of those files exist. Give them the four files, and put the directory under the import rule that holds every other directory here — because the next step moves two of these modules into the engine, and a move is only safe when a test reads the sources and says who may import whom.Done looks like
src/rooms/rooms.test.tsbecomessrc/rooms/code.test.ts,wire.test.ts,room.test.tsandhub.test.ts, each testing the module it is named for, with no assertion lost — the suite's count does not fall.src/rooms/stage.test-helper.ts, the way both games do it, rather than being copied four times.544 bytes — 8.7 kB/s a member at 16 Hz) from wherever the wire is tested, because that number is the argument for the rate.src/independence.test.tssays whosesrc/rooms/is. TodaygameOf("src/rooms/room.ts")isnull— the app — soroom.tsmay importsrc/range/as freely assrc/client/, which is exactly the sharing that file exists to refuse.room.tsandwire.tsare the shooter's:ALSO.appgainssrc/rooms, and a test assertsimportsAnotherGame("src/rooms/room.ts", "../range/targets.ts")is refused while"../client/world.ts"is allowed.code.tsandhub.tsimport no game today. A test reads their sources and says so, so the extraction in the issue that follows starts from a fact rather than a reading.src/rooms/names a test file that exists, and a test holds that claim by reading the sources — the habit this repository already has for the seam table.src/engine/GUIDE.mdexcept where it names a file that is not there.bun testandtsc --noEmitpass.Files
src/rooms/rooms.test.ts(deleted),src/rooms/{code,wire,room,hub}.test.ts(new),src/rooms/stage.test-helper.ts(new),src/independence.test.ts, and the four modules' docstrings.Risks
A split that drops a case is worse than the file it replaced: count the tests before and after and say both numbers in the pull.
ALSO.appgaining a directory widens what the shooter may reach for — check that nothing undersrc/rooms/importssrc/rl/on the way through.Torque.