mardi 15 septembre 2020

How to configure multiple test suites with Angular and angular.json

I would like to set up separate commands in my Angular 10 project to run different suites of tests. For example, to have different suites for unit tests and integration tests.

I can see the test configuration in the angular.json file, and that it uses src/test.ts as the entry / main. In the src/test.ts there is a line that finds all of the files with .spec.ts endings.

What I would like to do is to set up 2 separate test configurations so that I can execute command line commands with the intent of:

ng test --unit

or

ng test --integration

The unit tests would pick up all files ending in .spec.ts, while the integration tests would pick up files ending in .int.ts.

However, I think there can be only one test configuration in the angular.json file.

Is there a way that I can achieve the above or something similar?

Aucun commentaire:

Enregistrer un commentaire