作者:mobiledu2502890161 | 来源:互联网 | 2023-02-05 21:35
1> superluminar..:
您收到错误是因为TypeScript试图在app
构建中包含模拟,而应用程序(正确地)不知道Jasmine.
通过将模拟添加到exclude
数组中,从应用程序编译中排除模拟tsconfig.app.json
:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"baseUrl": "",
"types": []
},
"exclude": [
"test.ts",
"**/*.spec.ts",
"**/*.mock.ts"
]
}