Skip to content

Commit

Permalink
Minor: make CSP test error a little stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn committed Feb 17, 2024
1 parent 7674c63 commit 8d108f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/content-security-policy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,14 @@ describe("Content-Security-Policy middleware", () => {
) => {
res.statusCode = 500;
res.setHeader("Content-Type", "application/json");
res.end(JSON.stringify({ message: err.message }));
res.end(
JSON.stringify({ helmetTestError: true, message: err.message }),
);
},
);

await supertest(app).get("/").expect(500, {
helmetTestError: true,
message:
'Content-Security-Policy received an invalid directive value for "default-src"',
});
Expand Down

0 comments on commit 8d108f3

Please sign in to comment.