Skip to content

Commit 118719a

Browse files
authored
fix throws tests (#83)
1 parent 51b23d4 commit 118719a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ test('Create error with no statusCode property', t => {
111111
test('Should throw when error code has no fastify code', t => {
112112
t.plan(1)
113113

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

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

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

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

0 commit comments

Comments
 (0)