Skip to content

Test client

Scott Erickson edited this page Mar 10, 2016 · 1 revision


You want to write tests for the client (in app/) code you're writing.


Add a spec file to test/app which mirrors the location of the file being tested (test/app/views/ for app/views/ Use jasmine and jasmine-ajax to write your tests and mock network requests. Your test can be run at http://localhost:3000/test when running the dev environment.


Since is simply another view in the site, it behaves like any other: it reloads whenever a file changes. Use this for fast code-test iteration!

We run a slightly altered version of jasmine-ajax, which includes functions all and sendResponses. See vendor/scripts/jasmine-mock-ajax.js.


Clone this wiki locally
You can’t perform that action at this time.