This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
1 Replies Last post: Jan 21, 2013 6:19 PM by Sergey Simonchik  
Tom Lanning Newbie 2 posts since
Oct 20, 2006
Currently Being Moderated

Jan 20, 2013 7:02 PM

Coffeescript unit testing with Konacha (Mocha / chai)

I have a rails app that is morphing into prodominately a browser-side Coffeescript app.  I have been using Konacha ( for Coffeescript unit testing in the browser.  Konacha uses Mocha ( and chai ( for the test language and matchers.  Konacha has worked out well, but since I spend most of my development time developing Coffeescript, I want to use Rubymine's unit testing interface.  I tried (unsuccessfully) to get my test suite working with the jsTestDriver suite.  Has anyone else managed to get this combination working?  What is the least painful way to migrate to a solution that uses jsTestDriver?

Sergey Simonchik JetBrains 225 posts since
Sep 28, 2011
Currently Being Moderated
Jan 21, 2013 6:19 PM in response to: Tom Lanning
Re: Coffeescript unit testing with Konacha (Mocha / chai)

Please take a look at the provided sample project archive.

Unzip it in and open in IDE (JsTestDriver plugin should be installed).

Right-click my.jstd file and select Run. You'll be asked to start a local server and capture a browser. After doing this run my.jstd file one more time.

See screenshot of successful test run.


If you need better integration with rails, please provide more info about your tests. A little sample test project would be great.


More Like This

  • Retrieving data ...