如何在多应用程序项目中分别测试应用程序? [英] How to test apps separately in a multi-app project?
问题描述
我有一个多应用项目.我可以使用以下命令分别运行这些应用程序:ng serve --app <appName> -aot
.
I have a multi app project. I can run the apps separately with the following command: ng serve --app <appName> -aot
.
另一方面,我希望能够像运行它们一样分别为每个应用程序运行测试.
In the other hand I would like to be able to run the test for each app separately the same as running them.
例如ng test --app <appName> --sm=false
但是它没有按预期方式工作.测试始终由文件系统中的第一个应用程序开始.
e.g. ng test --app <appName> --sm=false
But it's doesn't work as expected. The test started always by the first app in the file system.
我一直在搜索,发现我可能不得不更改angular-cli.json
的配置-
I have been searching and found out that I might have to change to configuration of the angular-cli.json
- Proposal: app-specific karma config which make sense... but unfortunately it didn't work also.
请问有什么提示吗?
推荐答案
您不需要--app
参数.而是运行ng test <appName>
.
You don't need the --app
parameter. Instead run ng test <appName>
.
如果选中ng test --help
,您将得到:usage: ng test <project> [options]
If you check ng test --help
you get: usage: ng test <project> [options]
不过我在Angular CLI: 6.0.0-rc.6
上.
这篇关于如何在多应用程序项目中分别测试应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!