diff options
author | andre.schmid <andre.schmid@est.tech> | 2020-03-06 14:42:45 +0000 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-04-27 08:01:07 +0000 |
commit | 4a4d45fadfbb61e8e147f2b62e5dab5ac55403e8 (patch) | |
tree | 1e58f398d370ddcbb249f3a8fdc6659f2e3041bb /catalog-ui/package.json | |
parent | bebff57a6a661825d26a17813fe4a3230ac6f9db (diff) |
Enabling JS in SonarCloud
Configures jest test coverage and missing sonar
properties for javascript file scan and report.
Change-Id: I9170a176cc4e580ac14f669c334ee949942503f6
Issue-ID: SDC-2741
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui/package.json')
-rw-r--r-- | catalog-ui/package.json | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/catalog-ui/package.json b/catalog-ui/package.json index 1625802dce..fc99b356dc 100644 --- a/catalog-ui/package.json +++ b/catalog-ui/package.json @@ -12,11 +12,11 @@ "designer": "npm start -- --env.role designer", "admin": "npm start -- --env.role admin", "start": "webpack-dev-server", - "build": "npm run test && webpack --config webpack.config.js", - "build:prod": "npm run test && webpack --config webpack.production.js", + "build": "webpack --config webpack.config.js", + "build:prod": "webpack --config webpack.production.js", "lint": "ng lint", "pree2e": "webdriver-manager update --standalone false --gecko false --quiet", - "test": "jest", + "test": "jest --coverage", "test:watch": "jest --watch", "cypress": "cypress run", "cypress-headless": "start-server-and-test start http-get://localhost:9000 cypress" @@ -24,11 +24,15 @@ "jest": { "preset": "jest-preset-angular", "collectCoverageFrom": [ - "src/app/ng2/pages/composition/**/*.ts" + "<rootDir>/src/app/ng2/**/*.ts" + ], + "coverageDirectory": "<rootDir>/target/code-coverage/", + "coverageReporters": [ + "lcov" ], "setupTestFrameworkScriptFile": "<rootDir>/src/jest/setup-jest.ts", "transformIgnorePatterns": [ - "node_modules/(?!onap-ui-angular)" + "<rootDir>/node_modules/(?!onap-ui-angular)" ], "verbose": true, "roots": [ |