Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Fix use of Mocha as test framework around ngMock #2073

Closed
wants to merge 3 commits into from

Conversation

metamatt
Copy link
Contributor

Issue #1467 describes a real problem when trying to use the Mocha support that was introduced in 1.1.1 as pull request #1253. It seems the code actually merged for #1253 differed from the original author's proposal in one key regard.

This pull request fixes #1467, and, I believe, that's also the reason for issue #1589 and why #1253 kept attracting comments after it was closed.

While I was there, I fixed a couple comments.

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.
Remove comments about angular.mock.inject and angular.mock.module
being available for jasmine only. Since 1.1.1 the intent is that
they be available for mocha as well; now they even work!
Change "constroctor" to "constructor".
@IgorMinar
Copy link
Contributor

landed as:

  • c38c1c5 docs(ngMock): fix minor typo in comment
  • d4fe383 docs(ngMock): remove Jasmine-only comments now that Mocha works
  • 6397860 fix(ngMock): fix isSpecRunning to work for Mocha

thanks!

@IgorMinar IgorMinar closed this Feb 26, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NgMock: TypeError: Cannot read property 'running' of undefined
2 participants