This reverts commit 2bb9a65351
.
It breaks tests in google3 which rely on the error handling behavior.
PR Close #31918
This commit is contained in:

committed by
Andrew Kushnir

parent
185b3dd08e
commit
975917bafd
@ -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', () => {
|
||||
|
Reference in New Issue
Block a user