How do I point Jest testEnvironment to a node module in StencilJS Config?

自闭症网瘾萝莉.ら 提交于 2020-06-17 11:53:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!