Skip to content

five-on-it / apps/server/src/debug-runs

apps/server/src/debug-runs ​

Runs without the platform (TECHNICAL_SPECS §9.5), on a level server whose debug commands are on (a test-* level, npm run dev, FOI_DEBUG=1), as ?party= plays a mission together without it: a connection to /?run=<mission>&team=<team> (and &tag= to keep one test's run from another's, &roster=<team>,<team>… for the seats) takes a seat in a run of the default room's game and level. The first connection opens the run's room (debug-<mission>[-<tag>]) with a roster of the teams roster names, one seat each (one seat a team of the mission without it; a free-for-all's minimum of players), every seat an account of its own (debug-0, debug-1…); each connection takes the first seat of its team that nobody sits in (any team's without one). The room is a run's like any other (the gathering, the countdown, the missions held by holder 0, the room closing after the result), its traffic and crowd the run's share unless the server's settings say, its debug commands on; its result is kept here instead of being reported to a platform, for the end-to-end tests to read (GET /runs/<id> on the server; the last 64 kept). A run's room is a run's like any other for the server's admission (capacity.ts): one it would have to open past its cap of runs, past its players or too slow, is refused. The platform's runs are the real path (apps/api's runs.ts); this one only lets a test put two browsers in one run in seconds.

Interfaces ​

Functions ​