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

Check vitest global for @emotion/react loaded twice warning #2905

Merged
merged 2 commits into from Oct 27, 2022
Merged

Check vitest global for @emotion/react loaded twice warning #2905

merged 2 commits into from Oct 27, 2022

Conversation

p-m-p
Copy link
Contributor

@p-m-p p-m-p commented Sep 29, 2022

What:
vitest shows the same symptoms with the duplicate loading when mocking out modules that include @emotion/react.

Why:
Stop logging warnings during test runs.

How:
Include check for the vi global as well as jest. I had to add a flow type for vi but this is not something I'm familiar with so happy to do that properly with guidance.

Checklist:

  • Documentation (N/A)
  • Tests (N/A)
  • Code complete (N/A)
  • Changeset

@changeset-bot
Copy link

changeset-bot bot commented Sep 29, 2022

🦋 Changeset detected

Latest commit: 5d31936

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@emotion/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 29, 2022

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 5d31936:

Sandbox Source
Emotion Configuration

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Merging #2905 (84ccf43) into main (6eef2e3) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 84ccf43 differs from pull request most recent head 5d31936. Consider uploading reports for the commit 5d31936 to get more accurate results

Impacted Files Coverage Δ
packages/react/src/index.js 30.76% <100.00%> (ø)

@Andarist Andarist merged commit 4c0005f into emotion-js:main Oct 27, 2022
@github-actions github-actions bot mentioned this pull request Oct 27, 2022
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