I am running jasmine-node and encountered something really strange. Successful tests but failures in report:
.........
Finished in 0.142 seconds
9 tests, 11 assertions, 2 failures, 0 skipped
I am using done("error") to flag a failure.
I am running jasmine-node and encountered something really strange. Successful tests but failures in report:
.........
Finished in 0.142 seconds
9 tests, 11 assertions, 2 failures, 0 skipped
I am using done("error") to flag a failure.
Use done.fail(...) instead of done(...). done.fail(...) is the proper way to fail your asynchronous test.
So when my test succeeds:
done()
And when a callback is called which shouldn't be called:
done.fail("error")
This is how I check e.g. if a Promise.catch is called when it shouldn't, i.e. all callbacks that I can't spy on with SinonJS.