How to run Angular component tests (karma) for a certain folder or specific spec file

This runs all spec files that are descendants of the “my-area” folder and in the “Edge” browser.

ng test --include "src/app/my-area/**/*.spec.ts" --browsers=Edge

run a single spec file:

ng test --include "src/app/myarea/**/mytest.component.spec.ts" --browsers=Edge

Leave a Reply

Your email address will not be published. Required fields are marked *