The done.fail option in Jasmine 2.0 makes it easy to report the error from a failed promise but done.fail isn't implemented by the zone-aware version from jasmine-patch.js.
Therefore, the following test reports an async timeout instead of the actual error:
// this test fails the wrong way
it('async test with rejected promise reports error as expected via "done.fail"', done => {
Promise.reject('failed on purpose')
.then(result => {
fail('should not get here');
})
.then(done,
reason => {
done.fail(reason); // written this way for easy breakpointing
});
});
Not a huge priority but worth fixing and easy to fix.
The
done.failoption in Jasmine 2.0 makes it easy to report the error from a failed promise butdone.failisn't implemented by the zone-aware version from jasmine-patch.js.Therefore, the following test reports an async timeout instead of the actual error:
Not a huge priority but worth fixing and easy to fix.