Usage
Below is a boilerplate config file - place it in [project_path]/.cortado.js
:
moduleexports = //url to proxy when running tests - important to prevent cross-site security //issues proxy: "http://localhost:8080" //tests to run - these are actually loaded in the browser scripts: __dirname + "/test/**.js" //data-types to cache cache: types: "json" "png" directory: __dirname + "/test2/cache" //files to watch, then reload watch: __dirname + "/public/**" __dirname + "/test/**" //port to run tests on - open in http://localhost:8083/test port: 8083 //full integration full: true //keep the tests alive for dev mode keepAlive: true //called each time browsers are reloaded to run tests events: { ; }
Next, you can start writing tests using mocha. Here's an example test from [project_path]/tests/login-test.js
:
var assert = xpaths = config = utils = logout = ; ;
Finally, go ahead and run cortado:
cortado start