You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After migrating from nx ^14.3.6 to ^15.0.0, running test target for a library results in the following error:
> NX ● Validation Error:
Test environment jest-environment-jsdom cannot be found. Make sure the testEnvironment configuration option points to an existing node module.
Configuration Documentation:
https://jestjs.io/docs/configuration
As of Jest 28 "jest-environment-jsdom" is no longer shipped by default, make sure to install it separately.
Pass --verbose to see the stacktrace.
Introduced with #10857, the dev dependency to jest-environment-jsdom shall be added upon migration and when creating a new library with tests.
Steps to Reproduce
Setup library with nx version prior the stated PR.
Apply migration
Execute nx run my-lib:test
See error
Failure Logs
> NX ● Validation Error:
Test environment jest-environment-jsdom cannot be found. Make sure the testEnvironment configuration option points to an existing node module.
Configuration Documentation:
https://jestjs.io/docs/configuration
As of Jest 28 "jest-environment-jsdom" is no longer shipped by default, make sure to install it separately.
Pass --verbose to see the stacktrace.
Environment
> NX Report complete - copy this into the issue template
Node : 16.15.1
OS : win32 x64
npm : 8.11.0
nx : 15.0.0
@nrwl/angular : Not Found
@nrwl/cypress : 15.0.0
@nrwl/detox : Not Found
@nrwl/devkit : 15.0.0
@nrwl/esbuild : Not Found
@nrwl/eslint-plugin-nx : 15.0.0
@nrwl/expo : Not Found
@nrwl/express : Not Found
@nrwl/jest : 15.0.0
@nrwl/js : 15.0.0
@nrwl/linter : 15.0.0
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/nx-plugin : 15.0.0
@nrwl/react : 15.0.0
@nrwl/react-native : Not Found
@nrwl/rollup : 15.0.0
@nrwl/schematics : Not Found
@nrwl/storybook : 15.0.0
@nrwl/web : 15.0.0
@nrwl/webpack : 15.0.0
@nrwl/workspace : 15.0.0
typescript : 4.8.4
---------------------------------------
Local workspace plugins:
*****/***** (redacted information)
---------------------------------------
Community plugins:
The text was updated successfully, but these errors were encountered:
Current Behavior
After migrating from nx
^14.3.6
to^15.0.0
, running test target for a library results in the following error:See breaking changes of jest
Expected Behavior
Introduced with #10857, the dev dependency to
jest-environment-jsdom
shall be added upon migration and when creating a new library with tests.Steps to Reproduce
nx run my-lib:test
Failure Logs
Environment
The text was updated successfully, but these errors were encountered: