Skip to content

Make compatible with "injectGlobals" Jest configuration option - #53

Merged
ValentinH merged 1 commit into
ValentinH:mainfrom
jdufresne:injectglobals
Dec 8, 2025
Merged

Make compatible with "injectGlobals" Jest configuration option#53
ValentinH merged 1 commit into
ValentinH:mainfrom
jdufresne:injectglobals

Conversation

@jdufresne

Copy link
Copy Markdown
Contributor

The "injectGlobal" configuration option is documented at:

https://jestjs.io/docs/configuration#injectglobals-boolean

Insert Jest's globals (expect, test, describe, beforeEach etc.) into
the global environment.

To make compatible, import the "beforeEach" function from the "@jest/globals" package.

The option was also enabled in this projects test suite to further enforce that the support remains as the project evolves.

Fixes #41

The "injectGlobal" configuration option is documented at:

https://jestjs.io/docs/configuration#injectglobals-boolean

> Insert Jest's globals (expect, test, describe, beforeEach etc.) into
> the global environment.

To make compatible, import the "beforeEach" function from the
"@jest/globals" package.

The option was also enabled in this projects test suite to further
enforce that the support remains as the project evolves.

Fixes #41
@ValentinH

Copy link
Copy Markdown
Owner

Thank you!

@ValentinH
ValentinH merged commit 5d4d444 into ValentinH:main Dec 8, 2025
3 checks passed
@ValentinH

Copy link
Copy Markdown
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatible with Jest's injectGlobals: false

2 participants