Support `@jest/globals`
See original GitHub issueSee https://github.com/facebook/jest/pull/9801.
We need to support finding expect
, test
, it
etc when imported from @jest/globals
. Should be relatively simple for ESM syntax, possibly a bit more pain for require
. We need to support aliasing as well import { test as testFunction } from '@jest/globals'
Note that the feature hasn’t been released yet (blocked by https://github.com/facebook/jest/pull/9806), but we can add support before it lands.
/cc @G-Rath
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Globals - Jest
In your test files, Jest puts each of these methods and objects into the global environment. You don't have to require or import...
Read more >@jest/globals - npm
Start using @jest/globals in your project by running `npm i @jest/globals`. There are 128 other projects in the npm registry using ...
Read more >@jest/globals - npm Package Health Analysis | Snyk
Jest can be used in projects that use parcel-bundler to manage assets, styles, and compilation similar to webpack. Parcel requires zero configuration. Refer...
Read more >@jest/globals | Yarn - Package Manager
Added jest-editor-support for vscode and Nuclide integration. Fixed test.concurrent unhandled promise rejections. The Jest website is now auto-deployed when ...
Read more >jestjs - jest global variable example - Stack Overflow
Yep. You put the globals in the package.json. For example, here's an excerpt from the default react-native jest configuration:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nothing to apologize for! That’s just the way of FOSS 🙂
Yup! I think that’s reasonable