Jest explicitly or arbitrarily force fail() a test · Code with Hugo

added by JavaScript Kicks
10/21/2019 9:51:46 AM

194 Views

Here is our code under test: Here is the naive test, which succeeds if the error is thrown. To run this example, see Running the examples to get set up, then run: As we can see from the output, the test passes when put into the throw branch of the test under code.


0 comments