Assert POST error content-type in smoke test
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
5b28cfbbe9
commit
ebf290e8f5
1 file changed
+7
@@ -238,6 +238,13 @@ async function main() {
|
||||
)}.`,
|
||||
);
|
||||
}
|
||||
if ((postPage.headers.get("content-type") ?? "").toLowerCase() !== "text/plain; charset=utf-8") {
|
||||
throw new Error(
|
||||
`Smoke test failed: expected plain-text POST error content-type, got ${String(
|
||||
postPage.headers.get("content-type"),
|
||||
)}.`,
|
||||
);
|
||||
}
|
||||
if ((postPage.headers.get("cache-control") ?? "").toLowerCase() !== "no-store") {
|
||||
throw new Error("Smoke test failed: expected cache-control=no-store on POST response.");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user