Assert HEAD cache-control semantics in smoke test

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 01:28:41 +00:00
1 parent 5f17ee8a33
commit 976ff6fcdf
1 file changed
+7
+7
View File
@@ -234,6 +234,13 @@ async function main() {
`Smoke test failed: expected HEAD web status 200, received ${headPage.status}.`,
);
}
if ((headPage.headers.get("cache-control") ?? "").toLowerCase() !== "no-store") {
throw new Error(
`Smoke test failed: expected HEAD cache-control=no-store, got ${String(
headPage.headers.get("cache-control"),
)}.`,
);
}
const headContentLength = Number(headPage.headers.get("content-length") ?? "0");
if (!Number.isFinite(headContentLength) || headContentLength <= 0) {
throw new Error(