Describe the bug
jest-environment-jsdom v28+ tries to use browser exports instead of default exports which generates the following error when Jest testEnvironment: 'jsdom':
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
To Reproduce
Steps to reproduce the behavior:
git clone https://github.com/alex-l-miro/react-hook-bug.git
yarn
yarn test
Expected behavior
Jest should not fail when testEnvironment is jsdom
Describe the bug
jest-environment-jsdomv28+ tries to usebrowserexports instead of default exports which generates the following error when JesttestEnvironment: 'jsdom':To Reproduce
Steps to reproduce the behavior:
git clone https://github.com/alex-l-miro/react-hook-bug.gityarnyarn testExpected behavior
Jest should not fail when
testEnvironmentisjsdom