Skip to content

Commit 5587c03

Browse files
authored
fix(audits): avoid false positives in 9ABE (#148)
1 parent eac6dc8 commit 5587c03

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/audits/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,11 @@ export function serverAudits(opts: ServerAuditOptions): Audit[] {
191191
// Request POST
192192
audit(
193193
'9ABE',
194-
'MAY respond with 4xx status code if content-type is not supplied on POST requests',
194+
'SHOULD respond with 4xx status code if content-type is not supplied on POST requests',
195195
async () => {
196196
const res = await fetchFn(await getUrl(opts.url), {
197197
method: 'POST',
198+
body: JSON.stringify({ query: '{ __typename }' }),
198199
});
199200
ressert(res).status.toBeBetween(400, 499);
200201
},

tests/__snapshots__/audits.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ exports[`should not change globally unique audit ids 1`] = `
4444
},
4545
{
4646
"id": "9ABE",
47-
"name": "MAY respond with 4xx status code if content-type is not supplied on POST requests",
47+
"name": "SHOULD respond with 4xx status code if content-type is not supplied on POST requests",
4848
},
4949
{
5050
"id": "03D4",

0 commit comments

Comments
 (0)