Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix emit "pending" when running pending test #1707

Closed
wants to merge 1 commit into from

Conversation

dasilvacontin
Copy link
Contributor

Closes #1706.

Runnable.run(fn) wasn't passing an instance of Pending to the
callback when a pending test was ran. Therefore, Runner was not
firing a "pending" event.

Added a test which currently fails due to the skippedTest:
[TypeError: Object #<Object> has no method 'skip']. How does
one skip the current running test synchronously?

Also: why are we throwing a Pending instance? Couldn't we set pending = true in .skip(), and then check test.pending again at https://github.com/mochajs/mocha/blob/master/lib/runner.js#L475 ?

Closes #1706.

`Runnable.run(fn)` wasn't passing an instance of `Pending` to the
callback when a `pending` test was ran. Therefore, `Runner` was not
firing a "pending" event.

Added a test which currently fails due to the `skippedTest`:
`[TypeError: Object #<Object> has no method 'skip']`. How does one skip
the current running test synchronously?
@dasilvacontin
Copy link
Contributor Author

I forgot there was work pending on this one. Adding to my to-do list.

@jbnicolai jbnicolai force-pushed the master branch 3 times, most recently from 2f458ab to 2952eca Compare July 5, 2015 10:25
@hollomancer
Copy link

This is a valid issue - however, this PR has been inactive for a very long time. Let's revisit if we see a need.

@drazisil drazisil mentioned this pull request Mar 30, 2017
@drazisil drazisil deleted the fix/1706-missing-pending-events branch April 3, 2017 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing pending event
4 participants