diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 3df8d273..1c461c75 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -1615,9 +1615,7 @@ getJasmineRequireObj().clearStack = function(j$) { } function getClearStack(global) { - if (global && global.process && j$.isFunction_(global.process.nextTick)) { - return global.process.nextTick; - } else if (j$.isFunction_(global.setImmediate)) { + if (j$.isFunction_(global.setImmediate)) { var realSetImmediate = global.setImmediate; return function(fn) { realSetImmediate(fn); diff --git a/spec/core/ClearStackSpec.js b/spec/core/ClearStackSpec.js index 8ad6277d..26804be4 100644 --- a/spec/core/ClearStackSpec.js +++ b/spec/core/ClearStackSpec.js @@ -7,20 +7,6 @@ describe("ClearStack", function() { }); }); - it("uses nextTick when available", function() { - var nextTick = jasmine.createSpy('nextTick').and.callFake(function(fn) { fn() }), - global = { process: { nextTick: nextTick } }, - clearStack = jasmineUnderTest.getClearStack(global), - called = false; - - clearStack(function() { - called = true; - }); - - expect(called).toBe(true); - expect(nextTick).toHaveBeenCalled(); - }); - it("uses setImmediate when available", function() { var setImmediate = jasmine.createSpy('setImmediate').and.callFake(function(fn) { fn() }), global = { setImmediate: setImmediate }, diff --git a/src/core/ClearStack.js b/src/core/ClearStack.js index 224582b7..507b398a 100644 --- a/src/core/ClearStack.js +++ b/src/core/ClearStack.js @@ -18,9 +18,7 @@ getJasmineRequireObj().clearStack = function(j$) { } function getClearStack(global) { - if (global && global.process && j$.isFunction_(global.process.nextTick)) { - return global.process.nextTick; - } else if (j$.isFunction_(global.setImmediate)) { + if (j$.isFunction_(global.setImmediate)) { var realSetImmediate = global.setImmediate; return function(fn) { realSetImmediate(fn);