Running Jasmine Code Coverage using command Line

144 weergaven
Naar het eerste ongelezen bericht

Parth Mehta

ongelezen,
18 aug 2017, 13:48:3918-08-2017
aan Jasmine

Blanket JS with Mocha runs with a simple command:


mocha --require blanket


But how do I run Jasmine based test cases with a command?


The only example I came across is a browser based one: https://github.com/alex-seville/blanket/tree/master/test/jasmine

Gregg Van Hove

ongelezen,
21 aug 2017, 20:33:5021-08-2017
aan jasmi...@googlegroups.com
Jasmine doesn't currently have a way to require in extra code on the command line, but you should be able to use a helper file to require in Blanket JS.

To do this, you would add a file to the `helpers` array in your jasmine.json and in that file `require('blanket');` and do any option setting you need to do.

This is based on my reading of the BlanketJS docs a bit and knowledge of how Jasmine loads files, I haven't tried it, but it _should_ work.

Hope this helps. Thanks for using Jasmine!

- Gregg

--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jasmine-js+unsubscribe@googlegroups.com.
To post to this group, send email to jasmi...@googlegroups.com.
Visit this group at https://groups.google.com/group/jasmine-js.
For more options, visit https://groups.google.com/d/optout.

Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten