Jest, test multiple Angular libraries at one time

Viewed 1145

I am new to Jest (using angular-presets) and I am trying to test all the angular libraries in our project at one time.

What I hope to accomplish: I want the command ng test to run all my tests, both the application tests and the library tests.

What is happening: 'ng test' only the application tests. In order to run the library tests, I need to run each library test suite separately.

 $> ng test lib1
 $> ng test lib2
 $> ng test lib3
 $> ng test lib4
   and so on.

This takes forever to run manually because we have 18 libraries. It still takes too long to run the test to have a script that in sequence.

Question Is there any way to run all my test with a single angular cli command ng test?

1 Answers

I am using Jest for Angular. And it works very well for main source code and lib inside projects folder. Then It generates a report for you. You can read the configuration guide here.

Related