Skip to content

Commit

Permalink
test: remove duplicate test
Browse files Browse the repository at this point in the history
  • Loading branch information
climba03003 committed Mar 13, 2023
1 parent e46e676 commit 01a40e1
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions test/content-parser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -753,38 +753,3 @@ test('edge case content-type - ;', async t => {

t.pass('end')
})

test('edge case content-type - empty string', async t => {
t.plan(1)

const fastify = Fastify()
fastify.removeAllContentTypeParsers()
fastify.addContentTypeParser('', function (request, body, done) {
t.fail('should not be called')
done(null, body)
})

fastify.post('/', async () => {
return 'ok'
})

await fastify.inject({
method: 'POST',
path: '/',
headers: {
'content-type': 'application/json; foo=bar; charset=utf8'
},
body: ''
})

await fastify.inject({
method: 'POST',
path: '/',
headers: {
'content-type': 'image/jpeg'
},
body: ''
})

t.pass('end')
})

0 comments on commit 01a40e1

Please sign in to comment.