-
Notifications
You must be signed in to change notification settings - Fork 9
Testing
Andrew Smith edited this page Jan 31, 2015
·
1 revision
All tests run by command gulp test. The command npm test delegates to this command.
-
gulp lint- checks JS files for syntax or style mistakes -
gulp karma- runs client-side specs- Uses mocha, chai, and Chrome
-
gulp mocha- runs server-side specs- Uses mocha, chai, and supertest
gulp lint
Uses JSHint, the friendlier and less dogmatic version of JSLint. Combined with careful adherence to the style guide, JSHint helps keep code clean and uniform. Options are defined in file .jshintrc at root level.
gulp karma
Runs Karma test running for client-side tests. Configuration in file spec/karma.conf.js. Runs tests off Chrome browser. Special configuration present to allow Chrome browser testing in Travis, see the CI wiki page.
gulp mocha
Runs mocha framework for server-side tests. Uses 20 sec timeout to allow for some slower interactions with backend technologies, namely Cloudinary.
Spec files are thoroughly commented.