lamernews
lamernews copied to clipboard
JavaScript Tests?
Will there be any unit/acceptance/behaviour tests written for public/js/app.js? There are a number of issues I'd like to file and patch, but I'm concerned about doing so without at least some basic verification tests
I think perhaps all testing should be kept in the ruby layer, with capybara doing the integration testing of the javascript in a full-stack manner. None of the javascript is really suitable for individual unit tests as its basically all DOM interaction and ajax requests.
This project does need a test suite though.
Awesome, glad to see there is more interest in this :) I've actually started writing unit tests by copying some rendered markup from the site and stubbing ajax calls. I'd like to put all JS functionality in its own object (namespace).
Hopefully my pull request with js tools is landed