You didn't miss anything, it is the express test req.xhr
that will never fail.
If running your example, you will see the error stacktrace but the test passes because:
- it didn't catch the error during test.
- no error information passed to
done()
function call.
My fixes are in PR #2053:
- use
expect()
to return the assertion error to.end()
. - pass any error information to
done()
.