Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/audits/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] {
// Request POST
audit(
'9ABE',
'MAY respond with 4xx status code if content-type is not supplied on POST requests',
'SHOULD respond with 4xx status code if content-type is not supplied on POST requests',
async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
body: JSON.stringify({ query: '{ __typename }' }),
});
ressert(res).status.toBeBetween(400, 499);
},
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshots__/audits.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ exports[`should not change globally unique audit ids 1`] = `
},
{
"id": "9ABE",
"name": "MAY respond with 4xx status code if content-type is not supplied on POST requests",
"name": "SHOULD respond with 4xx status code if content-type is not supplied on POST requests",
},
{
"id": "03D4",
Expand Down
Loading