From 9c62facd03d961e671213c2c5d49ed7319c2a907 Mon Sep 17 00:00:00 2001 From: Albin Henriksson <albhe428@student.liu.se> Date: Thu, 18 Feb 2021 12:37:40 +0100 Subject: [PATCH] #7: Added coverage report to client side --- .gitlab/client.gitlab-ci.yml | 3 +++ client/package.json | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab/client.gitlab-ci.yml b/.gitlab/client.gitlab-ci.yml index 5313078a..d0850d79 100644 --- a/.gitlab/client.gitlab-ci.yml +++ b/.gitlab/client.gitlab-ci.yml @@ -51,3 +51,6 @@ client:test: - cd client - npm run test:coverage coverage: /All files\s*\|\s*([\d\.]+)/ + artifacts: + reports: + cobertura: client/output/coverage/jest/cobertura-coverage.xml diff --git a/client/package.json b/client/package.json index deacb7c4..3116f7da 100644 --- a/client/package.json +++ b/client/package.json @@ -38,7 +38,7 @@ "test": "react-scripts test", "eject": "react-scripts eject", "lint": "eslint \"./src/**/*.{js,ts,tsx}\"", - "test:coverage": "react-scripts test --coverage" + "test:coverage": "react-scripts test --coverage --coverageDirectory=output/coverage/jest" }, "browserslist": { "production": [ @@ -57,6 +57,10 @@ "src/**/*.{js,jsx,tsx,ts}", "!src/index.tsx", "!src/reportWebVitals.ts" + ], + "coverageReporters": [ + "text", + "cobertura" ] }, "proxy": "http://localhost:5000/api/" -- GitLab