运行笑话测试时,我收到此消息:
● 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