DEV Community

Discussion on: Running a single test suite/spec in Jasmine

Collapse
 
diek profile image
diek

Hi! Thank you! I'm thinking that maybe this is not the thread. I'm talking about angular.
I mean, with Java you can run the test you want to, you can even create groups and run the test in this group but not the rest in the project.
I want to, if I have 80 components, run for example 10. I can do this with karma + Jasmine?

Thread Thread
 
dzhavat profile image
Dzhavat Ushev

I've tried to search a bit on the internet for a solution but haven't found a good one. If you split your code in different libraries, you can easily run the tests for a specific library by using ng test <project>. You can also use the approach in this article by using fdescribe/fit to run specific suites/specs but I recommend only doing this locally. But be cautious using this approach because it's quite easy to commit fdescribe/fit and see your tests pass when in reality it's only one suite that is being executed.

Thread Thread
 
diek profile image
diek

Thank you, I will look out the fdescribe approach :)