Skip to content

Commit

Permalink
fix throws tests (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Aug 18, 2022
1 parent 51b23d4 commit 118719a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ test('Create error with no statusCode property', t => {
test('Should throw when error code has no fastify code', t => {
t.plan(1)

t.throws(() => createError(), 'Fastify error code must not be empty')
t.throws(() => createError(), new Error('Fastify error code must not be empty'))
})

test('Should throw when error code has no message', t => {
t.plan(1)

t.throws(() => createError('code'), 'Fastify error message must not be empty')
t.throws(() => createError('code'), new Error('Fastify error message must not be empty'))
})

test('Create error with different base', t => {
Expand Down

0 comments on commit 118719a

Please sign in to comment.