有人知道为什么我的角小丑测试报告:error TS2593: Cannot find name 'describe’.
??
我有一个NWL工作区运行一个角应用程序&多个Libs。
所有Libs中的测试运行良好。App中的测试都报告了此错误。我没有编辑配置-所以这些应该是来自NX设置的配置。我该怎么解决这个??有什么想法吗?
App TsConfigs: // tsconfig.json
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"typeRoots": ["node_modules/@types"],
"types" : ["node"],
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./tsconfig.editor.json"
}
]
}
// tsconfig.app.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"typeRoots": ["node_modules/@types"],
"types" : ["node"],
},
"files": ["src/main.ts", "src/polyfills.ts"]
}
// tsconfig.spec.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
}
发布于 2021-01-22 16:02:35
所以这对我没有用:
"compilerOptions": {
"typeRoots": ["node_modules/@types"],
"types" : ["node", "jest"],
},
但这确实是:?
"compilerOptions": {
},
但不知道为什么。
https://stackoverflow.com/questions/65848024
复制相似问题