This project is a lab sessions of the Master 2 IDOD course at the University of Le Havre.
A series of unit tests have been written in the test/test.js
file in order to test the features of a module created in app/scripts/modules/js-basics.js
. At first the tests are failing. You have to complete the missing code in app/scripts/modules/js-basics.js
so that all the tests pass. You do not have to modify the tests.
Knowing the assignment, follow the steps below in order to complete the lab.
(Just do this step once for all labs)
This project uses the Grunt task runner to run the project. Client side dependencies are handled with the Bower package manager. Grunt and Bower have to be installed with node
and npm
.
- First install NodeJS. You should have
node
ornodejs
as well asnpm
in your path. - Then install Grunt and Bower:
npm install -g grunt-cli npm install -g bower
When you fork a project, a copy of its repository with all the history is created for you. You become the owner of this new project and have write access to it.
Inside the Project's main folder, install its dependencies:
npm install
bower install
Once the project is installed, it can be run via grunt:
grunt serve
This will launch a Web server and open the index page of the project on your browser.
The app/
folder contains the HTML
CSS
and JavaScript
of the application. Depending on the lab (see the "Assignment" section) you will have to write code in these parts.
Unit test are kept in the tests/
folder. The tests/test.js
file contains all the assertions that will be tested. It is formatted with the QUnit testing framework. You will have to write unit tests in this file.
- Use
grunt testBrowser
to test on your browser. - Use
grunt testCI
to test on PhantomJS, the headless browser. This will be use by the Continuous Integration system.
Once completed with all unit tests passing, you can send me back you assignment as a pull request. The pull request will trigger a build of the project in the Continuous Integration framework TravisCI. For this you will have to commit your changes.
Note that you can also use Travis with your own project.