testing client scripts

66 views
Skip to first unread message

Rick Walsh

unread,
Apr 23, 2013, 6:35:14 AM4/23/13
to moc...@googlegroups.com
So, I'm successfully using mocha to test my nodejs app. 

I'm also using casperjs for integration testing etc

However I need some unit test coverage of my client side javascripts i.e. datamodel objects.

I'd like to use mocha for this rather than using something like QUnit. 

Has anybody done this?

Rick Walsh

unread,
Apr 23, 2013, 6:59:21 AM4/23/13
to moc...@googlegroups.com
I'm assuming I'm going to have to create some sort of html/javascript based test-runner?

Attila Domokos

unread,
Apr 23, 2013, 8:04:36 AM4/23/13
to moc...@googlegroups.com
You can do browser based testing with Mocha.
I wrote a blog post about it a while ago, you can find it here: http://www.adomokos.com/2012/05/running-mocha-specs-in-browser.html

The example there could be a bit dated, use this from mocha:

Hth:
Attila Domokos

--
You received this message because you are subscribed to the Google Groups "Mocha" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mochajs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages