1 This folder contains the tools needed to unit test the frontend
2 JavaScript files using Karma, Mocha, and Chai.
6 Install NPM if you haven't:
7 https://nodejs.org/en/download/package-manager/
9 Run 'npm install' to install all required dependencies in this
12 Run 'npm test' to run current unit 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
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.
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.
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.