-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
beforeAll: not skipped within describe.skip (again) #8379
Comments
I too am seeing this. |
Yep, experiencing this too, it's pretty consistent (full disclosure: I work with @weworkwithzoh) |
beforeAll() , always runs |
Hi, I have created this workaround, by adding a additioinal flag is it possible to get the skipped flag from the jest context?
}); |
This is especially painful when using Jest for functional tests that do some heavy lifting in |
If anyone is looking for an easy substitute for
Then append |
up |
Quick question, does running it with |
It did for us, yes.
…On Mon, 2 Dec 2019 at 20:08 Rogelio Guzman ***@***.***> wrote:
Quick question, does running it with (jest-circus)[
https://github.com/facebook/jest/tree/master/packages/jest-circus] fixes
the issue?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8379>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIQFYECHQAHUVPY6EZEOXDQWVFK5ANCNFSM4HIN42TQ>
.
|
Unfortunately we have an entire test suite that we want to be conditionally skipped. This "works", but Jest fails with:
So we have to include a dummy |
Any update here? As far as I know, this was a previous bug that appeared again. Currently I am using the workaround of adding |
me too |
+1 seeing the same issue on 25.1.0, MacOS, node 12.16.1. Started seeing failed tests in CI in our junit reports for skipped tests, and it turned out to be this issue. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
beforeAll
functions are run even when defined inside of adescribe.skip
block.To Reproduce
describe.skip
block.beforeAll
inside thedescribe.skip
block.Do something within the
beforeAll
function to confirm that it does or does not get run (e.g. add aconsole.log
statement, set some flag, etc.).Expected behavior
The function registered by the
beforeAll
is never executed.This bug was reported in #6166 and fixed in #6234, but it reappeared.
Link to repl or repo (highly encouraged)
https://codesandbox.io/s/74xr2vrpnj (use the Tests tab)
Jest runs via
react-scripts
at this version: https://github.com/facebook/create-react-app/blob/v2.1.8/package.json#L28The text was updated successfully, but these errors were encountered: