This demonstrates a couple of issues with unhandled promise rejection handling in Angular tests.
To run, do these steps in each of the unhandled-rejection-zonejs
,
unhandled-rejection-zoneless
, and no-ng
directories:
npm install
npm t
- If a browser isn't automatically launched, go to http://localhost:8888/.
Expected result: The spec should fail with a single "Unhandled promise rejection: Error: nope" error.
Observed:
- In
unhandled-rejection-zonejs
, the spec passes. - In
unhandled-rejection-zonelesss
, the spec fails with two copies of the expected error.