summaryrefslogtreecommitdiffstats
path: root/gui-pdp-monitoring/src/webapp/package.json
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2020-08-05 10:56:35 +0100
committerwaynedunican <wayne.dunican@est.tech>2020-08-05 10:56:42 +0100
commit8161792e4e8360a9c9d6d9ef13adeda699a51f6b (patch)
tree235db0366c06eebfc24a5850235c8678d964758a /gui-pdp-monitoring/src/webapp/package.json
parent76102da29a02f918d6c61e03cea4da2fd1fdcd92 (diff)
Jest JS Coverage setup
Jest JS Coverage setup 1) Generate coverage in reports/test-reporter.xml and in coverage/clover.xml 2) Config needed in SonarCloud project itself to pick up these reports Issue-ID: POLICY-2610 Change-Id: I1b639ff649cd6eb690762420118b3e8f595e970b Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'gui-pdp-monitoring/src/webapp/package.json')
-rw-r--r--gui-pdp-monitoring/src/webapp/package.json20
1 files changed, 17 insertions, 3 deletions
diff --git a/gui-pdp-monitoring/src/webapp/package.json b/gui-pdp-monitoring/src/webapp/package.json
index de4215c..b010413 100644
--- a/gui-pdp-monitoring/src/webapp/package.json
+++ b/gui-pdp-monitoring/src/webapp/package.json
@@ -4,7 +4,7 @@
"description": "GUI for monitoring Pdps Statistics",
"main": "index.js",
"scripts": {
- "test": "jest --coverage",
+ "test": "jest",
"build": "webpack",
"start": "webpack-dev-server --open"
},
@@ -12,9 +12,10 @@
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.8.7",
- "@babel/preset-env": "^7.8.7",
+ "@babel/preset-env": "^7.11.0",
"babel-jest": "^25.1.0",
- "jest": "^25.1.0",
+ "jest": "^26.1.0",
+ "jest-sonar-reporter": "^2.0.0",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
@@ -22,5 +23,18 @@
"dependencies": {
"d3": "^3.5.17",
"jquery": "^3.4.1"
+ },
+ "jest": {
+ "collectCoverage": true,
+ "transform": {
+ "^.+\\.[t|j]sx?$": "babel-jest"
+ },
+ "testResultsProcessor": "jest-sonar-reporter"
+ },
+ "jestSonar": {
+ "reportPath": "reports",
+ "reportFile": "test-reporter.xml",
+ "indent": 4,
+ "sonar56x": true
}
}