Closed
Description
Is this a bug report?
Yes
Did you try recovering your dependencies?
Yes.
Which terms did you search for in User Guide?
yarn workspaces, jest fails
, yarn jest
, jest env
, dispose is not a function
, jest typeError environment
, etc.
Environment
node -v
: 894npm -v
: 5.6.0yarn --version
(if you use Yarn): 1.3.2npm ls react-scripts
(if you haven’t ejected):
# react-scripts
sauron@0.4.0 /Users/agroza/Projects/bbp/sauron
└── (empty)
# react-scripts-ts
sauron@0.4.0 /Users/agroza/Projects/bbp/sauron
└── react-scripts-ts@2.13.0 extraneous
Then, specify:
- Operating system: Mac OS X Sierra 10.12
- Browser and version (if relevant):
Steps to Reproduce
- Clone cra-workspaces
- Run
yarn install
at root - Navigate to
apps/cra
and runyarn test
- Navigate to
packages/package-a
/packages/package-b
and runyarn run test:cov
Expected Behavior
Tests should run without errors.
Actual Behavior
Some tests are throwing:
FAIL src/foo.spec.ts
● Test suite failed to run
TypeError: environment.setup is not a function
at ../../node_modules/jest-runner/build/run_test.js:112:23
Reproducible Demo
See cra-workspaces repo for an example of setup that has this issue.
Metadata
Metadata
Assignees
Labels
No labels