Tests.
Server, app and web suites.
The package ships automated tests for the server (economy, ledger, unlocks, payment and ad verification, signed media, HLS, console, studio), the Flutter app and the web player.
01Server
Commands on this page are for macOS or Linux. On Windows, run them in WSL (Windows Subsystem for Linux) or Git Bash.
cd server && npm test
Covers the economy, ledger, unlocks, Stripe / App Store / AdMob verification, signed media, ffmpeg HLS, the console and the studio. In the release check it ran 73 tests in 6 files, all passing. npm run typecheck checks the TypeScript without building.
02Flutter app
cd app && flutter analyze && flutter test
In the release check: no analyzer issues, 8 tests passing (Flutter 3.41.4).
Before a store release also run the release check, which lists Google's sample AdMob app id, the example bundle id and the example app-link host (details):
cd app && sh tool/check_release.sh
03Web player (end to end)
The web suite runs in a browser against a live server in demo mode on port 8091 (or the address in E2E_BASE_URL). Use a test data folder, never your live one.
cd server && npm run build && npm run seed:sample && npm run e2e:prepare
DEMO_MODE=true RL_MISSIONS_ENABLED=true RL_PAYMENTS_MANUAL_ENABLED=true RL_CHAT_ENABLED=true PORT=8091 npm start
Then, in another terminal:
cd web && npm run build && npx playwright install chromium && npm run test:e2e
e2e:prepare adds the fixtures the suite expects (a like mission with target 1, a comment mission, one Coming soon series) and clears the guest sign-up rate limit (30 guests per IP per hour), which repeated runs reach.
Set DATA_DIR to a scratch folder for the test server. The fixtures change missions and series.