emotion-js / emotion

👩‍🎤 CSS-in-JS library designed for high performance style composition
https://emotion.sh/
MIT License
17.5k stars 1.11k forks source link

TypeError: React__namespace.createContext is not a function #3250

Open felipe-vicente opened 2 months ago

felipe-vicente commented 2 months ago

Current behavior: Getting the following error when testing components using @emotion/react

TypeError: React__namespace.createContext is not a function

To reproduce: https://github.com/felipe-vicente/test-emotion-jest

  1. yarn install
  2. yarn test components/index.test.jsx

Expected behavior: To render component and pass without warnings

Environment information: node 20.17.0 or 20.17.0

"@emotion/react": "11.13.3", "react": "18.2.0", "react-dom": "18.2.0"