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?
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.
Hey, I had to accomplish the same thing on the enterprise project I'm currently working on. The good news is that it's quite easy to accomplish that and make it scalable, which means no fit/xit etc..
Oh, nice approach with a custom config! Hadn't thought of that. I'm not about the scalability because this will require multiple configs for different purposes, am I right? Smart idea nonetheless! Thanks for sharing it.
Maybe I have used the word scalability with wrong connotation here. The goal for me was to execute only specific tests in specific module/submodules to save me some time in cases where I have a a of Jasmine tests.
Yes, you are right. To achieve this you need to add a little bit of additional configuration. Nonetheless it's all about the context we are working in :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Question here! How do i test only the components i want to? I want to be able to configurate different goals by components.
Hey, I'd like to help (if I can) but don't understand your question. What do you mean by testing only the components you want to?
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?
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 usingfdescribe
/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 commitfdescribe
/fit
and see your tests pass when in reality it's only one suite that is being executed.Thank you, I will look out the fdescribe approach :)
Hey, I had to accomplish the same thing on the enterprise project I'm currently working on. The good news is that it's quite easy to accomplish that and make it scalable, which means no fit/xit etc..
You can find an example of custom Jasmine configuration used inside Angular at my blog here: allthingsangular.com/introduction-...
It can be used to specify (include/exclude) exact folders, components, services or anything you want to test
If you need any help with setup just ping me.
cheers
Oh, nice approach with a custom config! Hadn't thought of that. I'm not about the scalability because this will require multiple configs for different purposes, am I right? Smart idea nonetheless! Thanks for sharing it.
Maybe I have used the word scalability with wrong connotation here. The goal for me was to execute only specific tests in specific module/submodules to save me some time in cases where I have a a of Jasmine tests.
Yes, you are right. To achieve this you need to add a little bit of additional configuration. Nonetheless it's all about the context we are working in :)