Skip to content

Commit 7094122

Browse files
fix: address review feedback - move test to test/, add test-reports/ to .gitignore, fix rate-limit header check
- Move rest-api.test.ts from src/__tests__/ to test/ per repo conventions - Add test-reports/ to .gitignore to prevent committing generated reports - Fix rate-limit header check: toBeDefined() doesn't catch null from Headers.get() Record missing headers as schema violation instead of hard-failing Co-Authored-By: Chris K <ckorhonen@gmail.com>
1 parent de24a10 commit 7094122

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ dist
33
.env
44
*.tgz
55
.tsbuildinfo
6+
test-reports/
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,9 +1170,9 @@ describeIfLive(
11701170
res.headers.get("ratelimit-remaining") ??
11711171
res.headers.get("x-ratelimit-limit") ??
11721172
res.headers.get("ratelimit-limit")
1173-
// Rate limiting headers should be present
1174-
expect(rateLimitHeader).toBeDefined()
1175-
record("headers.rateLimit", "GET", path, res)
1173+
// Record whether rate-limit headers are present (not all endpoints expose them)
1174+
const violations = rateLimitHeader === null ? ["no rate-limit headers found"] : []
1175+
record("headers.rateLimit", "GET", path, res, violations)
11761176
} catch (e) {
11771177
recordError("headers.rateLimit", "GET", path, e)
11781178
throw e

0 commit comments

Comments
 (0)