question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support `@jest/globals`

See original GitHub issue

See 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:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
SimenBcommented, May 3, 2020

Nothing to apologize for! That’s just the way of FOSS 🙂

1reaction
SimenBcommented, Apr 15, 2020

Yup! I think that’s reasonable

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found