You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
it('This test should be skipped!',function(){this.skip();});
It will be marked as failed (FAILED This test should be skipped!, Skipped 0 tests). If the test is run using mocha from the command line, the test is marked as pending.
However the followings works as expected in karma-mocha (Skipped 1 tests):
xit('This test should be skipped!',function(){
...
});
I stepped through it in the debugger and it seems that mocha tries to emit a "pending" event, however there are no listeners attached to this event.
The text was updated successfully, but these errors were encountered:
I ran into this issue again in my own mocha project, and I remembered this issue.
Here is where this.skip() ends up: lib/runner.js:532. Note that test.pending = true is not set. Only a pending event is fired, which you could use to track a flag for the test and then handle it as skipped in the test end event that karma-mocha already handles.
If this test is executed in karma-mocha:
It will be marked as failed (
FAILED This test should be skipped!
,Skipped 0 tests
). If the test is run using mocha from the command line, the test is marked as pending.However the followings works as expected in karma-mocha (
Skipped 1 tests
):I stepped through it in the debugger and it seems that mocha tries to emit a
"pending"
event, however there are no listeners attached to this event.The text was updated successfully, but these errors were encountered: