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

🗣️ Discussion: this.skip() - bug summary #3740

Closed
juergba opened this issue Feb 18, 2019 · 3 comments
Closed

🗣️ Discussion: this.skip() - bug summary #3740

juergba opened this issue Feb 18, 2019 · 3 comments
Labels
type: discussion debates, philosophy, navel-gazing, etc.

Comments

@juergba
Copy link
Member

juergba commented Feb 18, 2019

Description

1. this.skip() in beforeEach hooks

Incorrect hook pattern.
All beforeEach hooks are executed, but afterEach hooks are skipped completely, see #2546
=> fixed: #3741

2. async this.skip() in beforeEach hooks

results 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() in it tests

does not work correctly, since beforeEach hooks are executed, but afterEach hooks do not run.
=> fixed: #3859

4. this.skip() in afterEach hooks

Incorrect, 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() in after hooks

Incorrect, 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

@mrstux
Copy link

mrstux commented Jul 5, 2019

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.

@marmik18
Copy link

i am facing issue with this.skip() in it tests.
the test does not skip.

Page- added a commit to balena-io/balena-sdk that referenced this issue Jul 7, 2020
Page- added a commit to balena-io/balena-sdk that referenced this issue Jul 7, 2020
Page- added a commit to balena-io/balena-sdk that referenced this issue Jul 7, 2020
Page- added a commit to balena-io/balena-sdk that referenced this issue Jul 7, 2020
@JoshuaKGoldberg JoshuaKGoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2023
@JoshuaKGoldberg JoshuaKGoldberg added type: discussion debates, philosophy, navel-gazing, etc. and removed type: bug a defect, confirmed by a maintainer labels Dec 27, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title this.skip() - bug summary 🗣️ Discussion: this.skip() - bug summary Dec 27, 2023
@JoshuaKGoldberg
Copy link
Member

Closing as this just points to other issues/PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: discussion debates, philosophy, navel-gazing, etc.
Projects
None yet
Development

No branches or pull requests

5 participants