Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
39
rated 0 times [  40] [ 1]  / answers: 1 / hits: 125503  / 9 Years ago, thu, march 19, 2015, 12:00:00

So, I've been looking all over for this, found similar answers here, but not exactly what I want.



Right now if I want to test a single file with karma, I need to do fit(), fdescribe() on the file in question...



However, what I do want is to be able to just call karma, with the config file, and direct it to a specific file, so I don't need to modify the file at all, ie:



karma run --conf karma.conf.js --file /path/to/specific/test_file.js



is it possible to do this? Or with any helper? (using grunt or gulp?)


More From » gruntjs

 Answers
4

First you need to start karma server with



karma start


Then, you can use grep to filter a specific test or describe block:



karma run -- --grep=testDescriptionFilter

[#67377] Tuesday, March 17, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
reed

Total Points: 725
Total Questions: 85
Total Answers: 89

Location: Singapore
Member since Sat, Jul 25, 2020
4 Years ago
;