Set up JavaScript test
Set up automatic JavaScript tests with Mocha
and provide test coverage with c8
. In order to work in this repo it requires a full conversion from the CommonJS to the ES javascript module system which will be address in separate MR ( See also issue #19 ). A partial conversion would break the code, so I checked the proper functioning of the js-tests, coverage, and SonarQube report creating a mock toBeRemove.js
file compatible with ES module and its relative toBeRemove.test.js
file.
This MR does:
-
add js-test in gitlab-ci -
create a toBeRemove.js
script and its associated testtoBeRemove.test.js
-
analyse the js-test coverage in SonarQube -
list the js-test
in the test summary canvas just below
The CI successfully accomplish the js-test
and sonarqube
steps. It fails in creating the report because likely it would require some adaptations in the dpps-aiv-toolkit, which are not addressed in this MR.
closes #12
Edited by Matteo Balbo