-
-
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
[docs] Add synchronous test.each setup #7150
Conversation
This is not specific to |
True its not! I debated putting it in there I just didn't know if it was a bit too hidden? |
Meh, I'm fine with pointing people to it, then hopefully google will do the rest when people start searching for why it fails :P |
Cool I can update this to just be in the troubleshooting docs |
a7af9b0
to
0c8325c
Compare
@SimenB I've updated this to put the docs in troubleshooting |
docs/Troubleshooting.md
Outdated
@@ -192,6 +192,23 @@ Jest takes advantage of new features added to Node 6. We recommend that you upgr | |||
|
|||
Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istanbul, and therefore also tells Istanbul what files to instrument with coverage collection. When using `babel-plugin-istanbul`, every file that is processed by Babel will have coverage collection code, hence it is not being ignored by `coveragePathIgnorePatterns`. | |||
|
|||
## Defining Tests | |||
|
|||
Tests much be defined synchronously for Jest to be able to collect your tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/much/must
@@ -193,6 +193,23 @@ Jest takes advantage of new features added to Node 6. We recommend that you upgr | |||
|
|||
Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istanbul, and therefore also tells Istanbul what files to instrument with coverage collection. When using `babel-plugin-istanbul`, every file that is processed by Babel will have coverage collection code, hence it is not being ignored by `coveragePathIgnorePatterns`. | |||
|
|||
## Defining Tests | |||
|
|||
Tests much be defined synchronously for Jest to be able to collect your tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just fix the typo
docs/Troubleshooting.md
Outdated
|
||
Tests much be defined synchronously for Jest to be able to collect your tests. | ||
|
||
This means when you are using `test.each` you cannot set the table asynchronously within a `beforeEach` / `beforeAll`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should have the example above the mention of .each
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 716bc5f :)
Hopefully we'll get less reports about this now 🙂 |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Add a note on
test.each
synchronous setup.Motivation: #7100 (comment)
Test plan