Unify error dispatching between browser and node

This commit is contained in:
Steve Gravrock
2025-07-11 07:54:33 -07:00
parent d53d2ff3eb
commit ff476b1982
3 changed files with 27 additions and 50 deletions

View File

@@ -131,7 +131,7 @@ describe('GlobalErrors', function() {
dispatchEvent(globals.listeners, 'uncaughtException', new Error('bar'));
expect(handler).toHaveBeenCalledWith(new Error('bar'));
expect(handler).toHaveBeenCalledWith(new Error('bar'), undefined);
expect(handler.calls.argsFor(0)[0].jasmineMessage).toBe(
'Uncaught exception: Error: bar'
);
@@ -186,7 +186,8 @@ describe('GlobalErrors', function() {
'Unhandled promise rejection: 17\n' +
'(Tip: to get a useful stack trace, use ' +
'Promise.reject(new Error(...)) instead of Promise.reject(...).)'
)
),
undefined
);
});