Skip to content

Commit 2e5b2ae

Browse files
fix: use not.toBeNull() for cache-control header check
Headers.get() returns null (not undefined) when absent, so toBeDefined() always passes. Same class of bug as the rate-limit fix. Co-Authored-By: Chris K <ckorhonen@gmail.com>
1 parent 9c249ac commit 2e5b2ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/rest-api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ describeIfLive(
11861186
const res = await apiGet(path)
11871187
expect(res.status).toBe(200)
11881188
const cacheControl = res.headers.get("cache-control")
1189-
expect(cacheControl).toBeDefined()
1189+
expect(cacheControl).not.toBeNull()
11901190
record("headers.cacheControl", "GET", path, res)
11911191
} catch (e) {
11921192
recordError("headers.cacheControl", "GET", path, e)

0 commit comments

Comments
 (0)