Running Jasmine Code Coverage using command Line

已查看 144 次
跳至第一个未读帖子

Parth Mehta

未读,
2017年8月18日 13:48:392017/8/18
收件人 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

未读,
2017年8月21日 20:33:502017/8/21
收件人 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.

回复全部
回复作者
转发
0 个新帖子