mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
fix(ngMock): fix isSpecRunning to work for Mocha
When running inside Mocha, don't look in Jasmine's spec.queue.running. It's not there. This is documented as issue #1467; I think this issue was also responsible for #1589 and recent complaints in #1253. Closes #1467.
This commit is contained in:
2
src/ngMock/angular-mocks.js
vendored
2
src/ngMock/angular-mocks.js
vendored
@@ -1677,7 +1677,7 @@ window.jstestdriver && (function(window) {
|
||||
});
|
||||
|
||||
function isSpecRunning() {
|
||||
return currentSpec && currentSpec.queue.running;
|
||||
return currentSpec && (window.mocha || currentSpec.queue.running);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user