我将我的项目从 Angular 6.4 更新到 Angular 7.1,现在运行脚本:ng test app-name --coverage
给了我错误:
● Unrecognized CLI Parameters:
Following options were not recognized:
["main", "polyfills", "tsConfig"]
CLI Options Documentation:
https://jestjs.io/docs/en/cli.html
angular.json 中测试命令的配置如下所示:
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"main": "apps/app-name/src/test.ts",
"polyfills": "apps/app-name/src/polyfills.ts",
"tsConfig": "apps/app-name/tsconfig.spec.json",
"configPath": "./jest.config.json",
"styles": [
"apps/app-name/src/styles.scss"
],
"scripts": [],
"assets": [
"apps/app-name/src/favicon.ico",
"apps/app-name/src/assets"
]
}
},
我应该如何更新配置以与 Angular 7 兼容?