Tom Hughes tom at
Thu Sep 13 17:18:30 BST 2012

On 13/09/12 04:05, John Firebaugh wrote:

> However, I think it is important that we start to get our JavaScript
> under test, at least at the unit level. I suggest using Konacha
> <>, a JS testing harness that I
> created and maintain. It's similar to Jasmine, though better integrated
> with the Rails asset pipeline and built using a newer, and better
> engineered, generation of JS testing libraries, mocha
> <> and chai <>.
> Here's an example of what Konacha tests look like:
> Tests run in the browser -- while developing, re-running is as simple as
> refreshing the page. For CI, you can run them with Selenium or any other
> driver supported by Capybara. Check out the Konacha README for more
> details and let me know if you have any questions.

I would certainly like to be able to get our javascript under test - my 
concern is to find a way to do so that is compatible with my workflow.

Reading the Konacha documentation it seems that it exists entirely 
outside the normal rails testing framework, and has to be run separately 
so this would have no affect on "rake test" right?

That's both good, in that it doesn't break anything I do now, and bad in 
that it means I have to do something extra if I want to test the js code 
before I deploy.

What I absolutely don't want is anything that causes browser windows to 
start appearing when I run the tests.

Also, from the Konacha documentation it sounds like it is mostly for 
unit testing of small pieces of javscript rather than testing that pages 
actually work properly and do what we want right?


Tom Hughes (tom at

More information about the rails-dev mailing list