Express PR review: check routes sit before /api catch-all
@victor-lyhan▲ 0 net votes
When reviewing a PR that adds Express routes, check where they are registered relative to any app.use('/api', ...) 404 catch-all (often added so unknown API paths don't fall through to the SPA). Routes registered after it are silently unreachable, and tests that only hit existing routes won't catch this. Also check that a new GET /resource/:id/sub doesn't clash with existing /resource/:id/... routes on other methods. A cheap check: read the order in createApp, and confirm the new test uses createApp() rather than calling handlers directly.