fix(zone.js): don't wrap uncaught promise error. (#31443)
Close #27840 PR Close #31443
This commit is contained in:

committed by
Miško Hevery

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