add nick
[laas.git] / tests / README.txt
1 This folder contains the tools needed to unit test the frontend
2 JavaScript files using Karma, Mocha, and Chai.
3
4
5 Getting started:
6 Install NPM if you haven't:
7 https://nodejs.org/en/download/package-manager/
8
9 Run 'npm install' to install all required dependencies in this
10 folder.
11
12 Run 'npm test' to run current unit tests.
13
14
15 Adding tests:
16 Tests are located in the tests/ folder, you can simply edit the
17 existing ones or create a new one by making a file with the .js
18 file extension.
19
20 Karma is used for launching different browsers to run JavaScript.
21 See Karma documentation at https://karma-runner.github.io/
22 to add more browsers, files to test, or frameworks.
23
24 Mocha is used for the structure of the JavaScript testing itself.
25 See Mocha documentation at https://mochajs.org/ to see the syntax
26 required to create/modify tests. Currently, the tests use the
27 'TDD' interface from Mocha.
28
29 Chai is used for the actual testing, with it being an assertion
30 library. See Chai documentation at https://www.chaijs.com/ to see
31 the available usages for assertion. The tests use the 'assert' API
32 along with Mocha's TDD interface.