How to test apps separately in a multi-app project?

谁说我不能喝 提交于 2020-01-05 08:51:33

问题


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.

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.

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.


Any hint please?


回答1:


You don't need the --app parameter. Instead run ng test <appName>.

If you check ng test --help you get: usage: ng test <project> [options]

I am on Angular CLI: 6.0.0-rc.6, though.



来源:https://stackoverflow.com/questions/47330580/how-to-test-apps-separately-in-a-multi-app-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!