-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
Joe Johnston edited this page Feb 12, 2013
·
3 revisions
Tests are written in JavaScript using mocha and run against independent services like the CloudStore.
Because CloudStore is written in Erlang (a compiled language), running the test suite on your local machine will run tests against your development CloudStore. As a best practice, tests scope themselves to a random and unique branch (e.g. /some-random-uuid/*) and clean up after themselves on exit.
cd cloudstore
npm install
npm test
Running npm test
will execute the test script specified in package.json.
To debug tests, manually run mocha with the -d and --debug-brk options and use node-inspector to debug via the browser debug client.
npm install -g node-inspector
mocha --compilers coffee:coffee-script -d --debug-brk
node-inspector
# open browser to URL output by node-inspector