From investigating #117's bad merge that broke prod for ~10 min.
Severity: nit (process hardening)
File(s): server/tests/ (new file)
Why: vitest currently tests handlers, repositories, and verifiers in isolation. None of the 248 tests imports server.js end-to-end, so a route mounting an undefined controller method passes CI but crashes Railway at boot.
Suggestion: add a 1-test file that does:
import { describe, it, expect } from 'vitest';
describe('server bootstrap', () => {
it('imports server.js without throwing', async () => {
// Just resolving the module exercises every route mount + middleware
// declaration; a route referencing an undefined handler throws here.
await import('../server.js');
expect(true).toBe(true);
}, 5000);
});
Would have caught #117 before merge. Probably need to skip the actual app.listen (set an env flag) so the test doesn't bind a port.
🤖 Generated with Claude Code
From investigating #117's bad merge that broke prod for ~10 min.
Severity: nit (process hardening)
File(s):
server/tests/(new file)Why: vitest currently tests handlers, repositories, and verifiers in isolation. None of the 248 tests imports
server.jsend-to-end, so a route mounting an undefined controller method passes CI but crashes Railway at boot.Suggestion: add a 1-test file that does:
Would have caught #117 before merge. Probably need to skip the actual
app.listen(set an env flag) so the test doesn't bind a port.🤖 Generated with Claude Code