package.json开玩笑的配置中的未知选项“ globalSetup”

时间:2018-10-21 20:01:53

标签: javascript testing jestjs package.json yarn-workspaces

运行笑话测试时,我收到此消息:

● Validation Warning:

  Unknown option "globalSetup" with value "./testUtils/callSetup.js" was found.
  This is probably a typing mistake. Fixing it will remove this message.

我的package.json是这样的:

"jest": {
    "rootDir": "./src",
    "globalSetup": "./testUtils/callSetup.js",
    "transform": {
      "^.+\\.tsx?$": "ts-jest"
    },
    "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }

我的项目也是一个yarn工作区,并且上面的package.json是程序包的一部分。

源代码树如下:
|-包
|-服务器
|-package.json
|-src
|-testUtils
|-callSetup.js

0 个答案:

没有答案