We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec12ab9 commit 759fd6aCopy full SHA for 759fd6a
test.ts
@@ -31,6 +31,7 @@ test('should ignore JSON empty body', async () => {
31
res.end(JSON.stringify({ok: true}));
32
})
33
34
+ // Empty string body
35
await makeFetch(server)('/', {
36
body: '',
37
method: 'POST',
@@ -39,6 +40,15 @@ test('should ignore JSON empty body', async () => {
39
40
'Content-Type': 'application/json',
41
},
42
}).expect(200, { ok: true })
43
+
44
+ // Unset body
45
+ await makeFetch(server)('/', {
46
+ method: 'POST',
47
+ headers: {
48
+ Accept: 'application/json',
49
+ 'Content-Type': 'application/json',
50
+ },
51
+ }).expect(200, { ok: true })
52
53
54
test('should parse json body with no content-type headers', async () => {
0 commit comments