Angular 6 Karma target new library/project

How do I configure Karma to perform a test on a specific project within a workspace? 

So at the moment Karma is set to just run its test as "ng test [initial_project_name]", but how can I change this so it will run tests on newly generated libraries (ng new library [library_name]).

Manually in a terminal this would be "ng test library-name" but that is pretty messy workflow going down that route.

0
1 comment

Create your karma run configuration from `library-name/karma.conf.js` right-click menu, or using gutter icons in your lin spec files - `ng test` will be started with library-name; when creating run configuration manually, specify your library folder as karma working directory

 

If this doesn't work for you, make sure that you are running thre most recent WebStorm version where https://youtrack.jetbrains.com/issue/WEB-33843 is fixed

0

Please sign in to leave a comment.