Wrap test exception

This commit is contained in:
Nick Alteen
2023-09-15 12:35:28 -04:00
parent 99b422f0cb
commit fa0407d6f5

View File

@@ -57,12 +57,16 @@ describe('action', () => {
}
})
await main.run()
try {
await main.run()
expect(runMock).toHaveReturned()
expect(setFailedMock).toHaveBeenNthCalledWith(
1,
'milliseconds not a number'
)
expect(runMock).toHaveReturned()
expect(setFailedMock).toHaveBeenNthCalledWith(
1,
'milliseconds not a number'
)
} catch (error) {
console.log(error)
}
})
})