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

Cannot require @linaria/babel-preset in Jest 27 #1006

Closed
layershifter opened this issue Jul 18, 2022 · 0 comments
Closed

Cannot require @linaria/babel-preset in Jest 27 #1006

layershifter opened this issue Jul 18, 2022 · 0 comments
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked cat: testing 🛡 Issue related to testing components needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@layershifter
Copy link
Contributor

Environment

{
  "@linaria/babel-preset": "^4.0.0-beta.0",
  "@linaria/shaker": "^4.0.0-beta.0"
}

Description

  • Require @linaria/babel-preset in a test
  • Run tests
  • The issue is present only with Jest 27, 28 works fine
FAIL  ./index.spec.js
  ● Test suite failed to run

    Cannot find module '@linaria/core/processors/utils/hasMeta' from 'node_modules/@linaria/babel-preset/lib/utils/collectTemplateDependencies.js'

    Require stack:
      node_modules/@linaria/babel-preset/lib/utils/collectTemplateDependencies.js
      node_modules/@linaria/babel-preset/lib/utils/getTagProcessor.js
      node_modules/@linaria/babel-preset/lib/utils/processTemplateExpression.js
      node_modules/@linaria/babel-preset/lib/plugins/babel-transform.js
      node_modules/@linaria/babel-preset/lib/index.js
      index.spec.js

Reproducible Demo

https://stackblitz.com/edit/node-wzlsxu

@layershifter layershifter added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Jul 18, 2022
@github-actions github-actions bot added cat: testing 🛡 Issue related to testing components and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Jul 18, 2022
@Anber Anber closed this as completed in ea41d44 Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked cat: testing 🛡 Issue related to testing components needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

No branches or pull requests

1 participant