Don't remove existing unhandled exception and promise rejection handlers in Node
This commit is contained in:
@@ -142,11 +142,9 @@ describe('GlobalErrors', function() {
|
||||
|
||||
errors.install();
|
||||
expect(globals.listeners.uncaughtException).toEqual([
|
||||
originalHandler,
|
||||
jasmine.any(Function)
|
||||
]);
|
||||
expect(globals.listeners.uncaughtException).not.toEqual([
|
||||
originalHandler()
|
||||
]);
|
||||
|
||||
errors.pushListener(handler);
|
||||
|
||||
@@ -175,11 +173,9 @@ describe('GlobalErrors', function() {
|
||||
|
||||
errors.install();
|
||||
expect(globals.listeners.unhandledRejection).toEqual([
|
||||
originalHandler,
|
||||
jasmine.any(Function)
|
||||
]);
|
||||
expect(globals.listeners.unhandledRejection).not.toEqual([
|
||||
originalHandler()
|
||||
]);
|
||||
|
||||
errors.pushListener(handler);
|
||||
|
||||
@@ -257,11 +253,9 @@ describe('GlobalErrors', function() {
|
||||
errors.install();
|
||||
|
||||
expect(globals.listeners.rejectionHandled).toEqual([
|
||||
originalHandler,
|
||||
jasmine.any(Function)
|
||||
]);
|
||||
expect(globals.listeners.rejectionHandled).not.toEqual([
|
||||
originalHandler
|
||||
]);
|
||||
|
||||
errors.uninstall();
|
||||
expect(globals.listeners.rejectionHandled).toEqual([originalHandler]);
|
||||
|
||||
Reference in New Issue
Block a user