diff options
-rw-r--r-- | gui-clamp/pom.xml | 3 | ||||
-rw-r--r-- | gui-clamp/ui-react/package.json | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gui-clamp/pom.xml b/gui-clamp/pom.xml index d9cd62c..01978fb 100644 --- a/gui-clamp/pom.xml +++ b/gui-clamp/pom.xml @@ -33,6 +33,9 @@ <ui.react.src>ui-react</ui.react.src> <ui.react.lib.src>ui-react-lib</ui.react.lib.src> <npm.publish.url>https://nexus3.onap.org/repository/npm.snapshot/</npm.publish.url> + <sonar.nodejs.executable>${project.build.directory}/ui-react/node/node</sonar.nodejs.executable> + <sonar.sources>${project.basedir}/ui-react/src</sonar.sources> + <sonar.exclusions>**/*.test.js</sonar.exclusions> </properties> <build> <plugins> diff --git a/gui-clamp/ui-react/package.json b/gui-clamp/ui-react/package.json index 13d830e..a20c7f4 100644 --- a/gui-clamp/ui-react/package.json +++ b/gui-clamp/ui-react/package.json @@ -54,7 +54,8 @@ "history": "5.0.0", "jest": "26.6.0", "jest-canvas-mock": "2.3.1", - "jest-fetch-mock": "3.0.3" + "jest-fetch-mock": "3.0.3", + "jest-sonar-reporter": "2.0.0" }, "browserslist": [ ">0.2%", @@ -64,10 +65,12 @@ ], "jest": { "verbose": true, - "coverageDirectory": "${project.build.directory}/${ui.react.src}/coverage", + "collectCoverage": true, + "coverageDirectory": "${project.build.directory}/code-coverage", "collectCoverageFrom": [ "**/*.{js,jsx}" ], + "testResultsProcessor": "jest-sonar-reporter", "rootDir": "${project.build.directory}/${ui.react.src}", "coverageReporters": [ "lcov" @@ -83,6 +86,12 @@ "enzyme-to-json/serializer" ] }, + "jestSonar": { + "reportPath": "../../target/reports", + "reportFile": "test-reporter.xml", + "indent": 4, + "sonar56x": true + }, "babel": { "presets": [ "@babel/preset-env", |