Skip to content

Commit 6397860

Browse files
metamattIgorMinar
authored andcommitted
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 angular#1467; I think this issue was also responsible for angular#1589 and recent complaints in angular#1253. Closes angular#1467.
1 parent 398691b commit 6397860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngMock/angular-mocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,7 @@ window.jstestdriver && (function(window) {
16771677
});
16781678

16791679
function isSpecRunning() {
1680-
return currentSpec && currentSpec.queue.running;
1680+
return currentSpec && (window.mocha || currentSpec.queue.running);
16811681
}
16821682

16831683
/**

0 commit comments

Comments
 (0)