Skip to content
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

Prevent Jest from injecting globals #493

Merged
merged 2 commits into from Oct 6, 2020
Merged

Conversation

Vinnl
Copy link
Contributor

@Vinnl Vinnl commented Oct 6, 2020

Since 9cc1379, Jest supports
disabling the injection of globals. This makes tests easier to
follow, and ensures that all types can be properly checked as well.

(Unfortunately this also exposed a flaw in Jest's type definitions,
which I've fixed here but which isn't released yet:
jestjs/jest#10600
Fix has been released, workarounds removed: f0e99c9)

  • I've added a unit test to test for potential regressions of this bug.
  • The changelog has been updated, if applicable.
  • Commits in this PR are minimal and have descriptive commit messages.

@Vinnl Vinnl requested a review from NSeydoux October 6, 2020 10:13
@Vinnl Vinnl self-assigned this Oct 6, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 6, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 80d6317:

Sandbox Source
inrupt/solid-client-js: sandbox Configuration

Copy link
Contributor

@pmcb55 pmcb55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Use the new release with a fix for
jestjs/jest#10600.
Since 9cc1379, Jest supports
disabling the injection of globals. This makes tests easier to
follow, and ensures that all types can be properly checked as well.

(Unfortunately this also exposed a flaw in Jest's type definitions,
which I've fixed here but which isn't released yet:
jestjs/jest#10600)
@vercel vercel bot temporarily deployed to Preview October 6, 2020 11:18 Inactive
@Vinnl Vinnl merged commit bf9d268 into master Oct 6, 2020
@Vinnl Vinnl deleted the test/no-global-injection branch October 6, 2020 11:31
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.

None yet

2 participants