Why My Unit Tests Passed But My App Was Broken
typescript
dev.to
I'm building RunHop in public — a social + event platform for running races, built on NestJS. Today I set up e2e test infrastructure: dedicated test database, automatic resets, proper isolation. And within the first run, the e2e tests caught a bug that unit tests had been blind to for days. The Bug Unit Tests Can't See Here's the controller method that passed every unit test: // organization.controller.ts @Patch(':id') async update( @CurrentUser() user: interfaces.Authenticat