-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
fix(@jest/test-utils): use build-in Jest types instead of @types/jest
#13283
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,9 +5,11 @@ | |
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| /* eslint-disable jest/no-focused-tests */ | ||
|
|
||
| import semver = require('semver'); | ||
| import type {Global} from '@jest/types'; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a reminder. It is not possible to import from
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should fix the cycle - lerna warns every time I publish. Would be nice if yarn did the same on
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where does Lerna find a cycle? In this comment I try to say that here importing from
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. I recall that. It was added in #12626
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup |
||
|
|
||
| declare const describe: Global.TestFrameworkGlobals['describe']; | ||
| declare const test: Global.TestFrameworkGlobals['test']; | ||
|
|
||
| export function isJestJasmineRun(): boolean { | ||
| return process.env.JEST_JASMINE === '1'; | ||
|
|
||
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.
this is weird. But I think it'd work if imported from
@jest/globals, so probably fine 🙂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.
Right. Just check, it works if imported from
@jest/globals.