Skip to content

Commit

Permalink
Updates tests (patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrrrzzt committed Feb 21, 2020
1 parent ff01fd0 commit 5b650c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/modules/input-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('throws if missing input', t => {
const expectedErrorMessage = 'Missing required input'
const error = t.throws(() => {
calculateScore()
}, Error)
}, { instanceOf: Error })

t.is(error.message, expectedErrorMessage)
})
Expand All @@ -16,7 +16,7 @@ test('throws if not input.answers ', t => {
const expectedErrorMessage = 'Missing required input data.answers'
const error = t.throws(() => {
calculateScore({ answers: false })
}, Error)
}, { instanceOf: Error })

t.is(error.message, expectedErrorMessage)
})
Expand All @@ -25,7 +25,7 @@ test('throws if input.answers is wrong format', t => {
const expectedErrorMessage = 'Wrong format. Data.answers must be an array'
const error = t.throws(() => {
calculateScore({ answers: 'wrong' })
}, Error)
}, { instanceOf: Error })

t.is(error.message, expectedErrorMessage)
})

0 comments on commit 5b650c6

Please sign in to comment.