-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
🗣️ Discussion: this.skip() - bug summary #3740
Comments
Would really like to see this.skip() from an Async test result in the afterEach being called. In our test suite, the this.skip() is being called from a function invoked by the test which checks prerequisites, and if they fail, it calls skip(), which as you know, throws an exception which aborts the outer function. Except the cleanup hook doesn’t get called, and should. |
i am facing issue with |
See: mochajs/mocha#3740 Change-type: patch
See: mochajs/mocha#3740 Change-type: patch
See: mochajs/mocha#3740 Change-type: patch
See: mochajs/mocha#3740 Change-type: patch
Closing as this just points to other issues/PRs. |
Description
1.
this.skip()
inbeforeEach
hooksIncorrect hook pattern.
All
beforeEach
hooks are executed, butafterEach
hooks are skipped completely, see #2546=> fixed: #3741
2. async
this.skip()
inbeforeEach
hooksresults in a "Uncaught async skip; aborting execution", see test
before
hooks seem to work async though, and as per user documentation it should work.=> fixed: #3745
3.
this.skip()
init
testsdoes not work correctly, since
beforeEach
hooks are executed, butafterEach
hooks do not run.=> fixed: #3859
4.
this.skip()
inafterEach
hooksIncorrect, since already passed/failed tests are set to
pending
retrospectively. No tests are skipped at all.=> definition of use case still pending
5.
this.skip()
inafter
hooksIncorrect, since already passed/failed tests are set to
pending
retrospectively. No tests are skipped at all.=> soft deprecation: #3719
=> disallow usage: #4136
6.
this.skip()
with--allow-uncaught
Incorrect, since silently aborts execution after first
this.skip()
.=>fixed: #4030
Versions
current master
The text was updated successfully, but these errors were encountered: