Assert static asset max-age cache policy in smoke

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 01:31:38 +00:00
1 parent 0a1a0c0a27
commit dbff0f96d3
1 file changed
+7
+7
View File
@@ -195,6 +195,13 @@ async function main() {
)}.`,
);
}
if (!assetCacheControl.includes("max-age=31536000")) {
throw new Error(
`Smoke test failed: expected max-age=31536000 on built asset, got ${String(
assetResponse.headers.get("cache-control"),
)}.`,
);
}
const missingAssetUrl = new URL("/assets/missing-bundle.js", parsedAppUrl);
const missingAsset = await fetch(missingAssetUrl);
if (missingAsset.status !== 404) {