问题
I'm trying to set testEnvironment
to "jsdom" in stencil.config.ts
like this:
testing: {
testEnvironment: "jsdom"
}
However, running npm test
gives me this error:
[ ERROR ] runJest: ● Validation Error: Test environment
C:/path/to/my/project/stencil.config.ts/jsdom
cannot be found. Make sure the testEnvironment configuration option
points to an existing node module. Configuration Documentation:
https://jestjs.io/docs/configuration.html
How do I point Jest testEnvironment
to a node module in StencilJS Config?
(Stencil version 1.12.2)
来源:https://stackoverflow.com/questions/61664459/how-do-i-point-jest-testenvironment-to-a-node-module-in-stenciljs-config