diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index 6238ebe0ac..ebb00cfa95 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -245,6 +245,10 @@ async function main() { if (!assetEtag || assetEtag.length === 0) { throw new Error("Smoke test failed: expected ETag on built asset response."); } + const assetContentType = assetResponse.headers.get("content-type"); + if (!assetContentType || assetContentType.length === 0) { + throw new Error("Smoke test failed: expected content-type on built asset response."); + } const assetLastModified = assetResponse.headers.get("last-modified"); if (!assetLastModified || assetLastModified.length === 0) { throw new Error("Smoke test failed: expected Last-Modified on built asset response."); @@ -280,6 +284,13 @@ async function main() { )}.`, ); } + if (conditionalAsset.headers.get("content-type") !== assetContentType) { + throw new Error( + `Smoke test failed: expected conditional asset content-type ${assetContentType}, got ${String( + conditionalAsset.headers.get("content-type"), + )}.`, + ); + } if ((conditionalAsset.headers.get("cache-control") ?? "").toLowerCase() !== assetCacheControl) { throw new Error("Smoke test failed: expected cache-control preserved on conditional asset response."); } @@ -605,6 +616,13 @@ async function main() { )}.`, ); } + if (conditionalHeadAsset.headers.get("content-type") !== assetContentType) { + throw new Error( + `Smoke test failed: expected conditional HEAD asset content-type ${assetContentType}, got ${String( + conditionalHeadAsset.headers.get("content-type"), + )}.`, + ); + } if ((conditionalHeadAsset.headers.get("cache-control") ?? "").toLowerCase() !== assetCacheControl) { throw new Error( "Smoke test failed: expected cache-control preserved on conditional HEAD asset response.",