Sample tic-tac-toe JS project.
You can find the project tests in the test
directory.
Unit Tests are located in test/unit
directory. The tests were written with Jasmine and Sinon.JS. The project also uses Karma to run the tests either locally (on Google Chrome) or in the cloud with SauceLabs on environments with Windows 7, Firefox 35 and Chrome 39.
When the unit tests run, a code coverage report is automatically generated in the coverage
directory. The project uses Istanbul to generate this report.
UI Tests are located in test/ui
directory. The tests were written with CasperJS, which uses PhantomJS as a headless browser.
The project uses CircleCI as a CI server. Every commit will trigger a new build on CircleCI.
To build the project manually just run npm install
to install the dependencies and npm test
to run all tests. If you want to run the tests separately:
- The
grunt
command will run the unit tests locally. PS: It requires Chrome to run, and if you don't have grunt-cli installed globally, please runnpm install -g grunt-cli
also. - The
grunt ci
will run the unit tests on SauceLabs environments described inkarma.conf.js
. - The
casperjs test test/ui/tic_tac_toe_uiTest.js
will run the UI tests.