Uh oh!
There was an error while loading. Please reload this page.
fix(test-runner): warn users who invoke the test-runner with Jest - #7743
Merged
Max Schmitt (mxschmitt) merged 1 commit intoJul 22, 2021
Merged
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Max Schmitt (mxschmitt)force-pushed
the
bugfix/warn-if-invoked-via-jest
branch
2 times, most recently
from
July 21, 2021 10:27
2b5fa8a to
5ae366cCompareJoel Einbinder (JoelEinbinder)
commented
Jul 21, 2021
Contributor
I agree with dmitry that it's impolite to throw immediately if we detect Jest. Let's just throw a better error message if we detect Jest when we currently throw |
Max Schmitt (mxschmitt)force-pushed
the
bugfix/warn-if-invoked-via-jest
branch
from
July 22, 2021 10:52
5ae366c to
b39825eCompareDmitry Gozman (dgozman)
approved these changes
Jul 22, 2021
Uh oh!
There was an error while loading. Please reload this page.
Max Schmitt (mxschmitt)force-pushed
the
bugfix/warn-if-invoked-via-jest
branch
from
July 22, 2021 16:18
b39825e to
8735ae7Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates:
test() can only be called in a test fileerror while I runnpx playwright test#7714See here about the worker-index env var: https://jestjs.io/docs/environment-variables. Its probably the easiest way to detect if its Jest or not.
Before it lead to when using Jest on Playwright tests:
Not sure where to put, we can also put it on the top-level at the end of the file.