You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
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.
Original issue angular/angular#4136
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.
/cc @wardbell