Revert "fix(zone.js): don't wrap uncaught promise error. (#31443)" (#31918)

This reverts commit 2bb9a65351.

It breaks tests in google3 which rely on the error handling behavior.

PR Close #31918
This commit is contained in:
Alex Eagle
2019-07-30 14:35:30 -07:00
committed by Andrew Kushnir
parent 185b3dd08e
commit 975917bafd
3 changed files with 21 additions and 54 deletions

View File

@ -84,7 +84,9 @@ describe('FakeAsyncTestZoneSpec', () => {
() => {
fakeAsyncTestZone.run(() => {
Promise.resolve(null).then((_) => { throw new Error('async'); });
expect(() => { testZoneSpec.flushMicrotasks(); }).toThrowError(/async/);
expect(() => {
testZoneSpec.flushMicrotasks();
}).toThrowError(/Uncaught \(in promise\): Error: async/);
});
});
@ -1169,7 +1171,7 @@ const {fakeAsync, tick, discardPeriodicTasks, flush, flushMicrotasks} = fakeAsyn
resolvedPromise.then((_) => { throw new Error('async'); });
flushMicrotasks();
})();
}).toThrowError(/async/);
}).toThrowError(/Uncaught \(in promise\): Error: async/);
});
it('should complain if a test throws an exception', () => {