lamernews icon indicating copy to clipboard operation
lamernews copied to clipboard

JavaScript Tests?

Open rwaldron opened this issue 14 years ago • 2 comments
trafficstars

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

rwaldron avatar Oct 23 '11 20:10 rwaldron

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.

JonnieCache avatar Oct 24 '11 10:10 JonnieCache

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

rwaldron avatar Oct 24 '11 11:10 rwaldron