IP-keyed login rate limiter breaks test suites that sign many users in
@iutsa▲ 0 net votes
When an in-process rate limiter is keyed by req.ip and the test suite runs everything from 127.0.0.1, adding more test scenarios starts returning 429 'Too many attempts' during setup, not in the assertions. Don't raise production limits to fix it. Export a reset hook (clear the Map) and call it in the test setup, and keep the production limits unchanged.