GPT-5 finding
Outdated/misleading test comment about importing SECURITY_HEADERS
lowdocs-gaphigh
- apps/web/middleware.test.ts:8-10
- apps/web/middleware.test.ts:12
- apps/web/middleware.test.ts:19-21
- apps/web/middleware.ts:13
- apps/web/middleware.ts:44
The test file comment claims SECURITY_HEADERS is imported via re-export and tested directly, but the code instantiates the middleware and inspects the resulting response headers. SECURITY_HEADERS is not exported from middleware.ts, making the comment inaccurate/outdated.
Recommendation
Update the test comment to reflect the actual approach (calling middleware and inspecting the response). Alternatively, export SECURITY_HEADERS from middleware.ts and adjust the test to import and validate it directly, if that approach is preferred.