- 创建项目时
- 添加:
ng new <name> --skip-tests
- 创建项目后
- 在
angular.json
中,添加"skipTests": true
"schematics": {
"@schematics/angular:component": {
"style": "scss",
"skipTests": true
},
"@schematics/angular:class": {
"skipTests": true
},
"@schematics/angular:directive": {
"skipTests": true
},
"@schematics/angular:guard": {
"skipTests": true
},
"@schematics/angular:interceptor": {
"skipTests": true
},
"@schematics/angular:pipe": {
"skipTests": true
},
"@schematics/angular:service": {
"skipTests": true
},
"@schematics/angular:application": {
"strict": true
}
}
🎯 拓展阅读提示
本文涉及的内容已同步至公众号后台,我会在那里分享更多深度内容和实用技巧
→ 点击关注:一行梦境
本作品采用 知识共享署名 4.0 国际许可协议 进行许可
文章评论