Skip to content
Snippets Groups Projects
Unverified Commit 38382b40 authored by Martin Weise's avatar Martin Weise
Browse files

Added coverage report

parent c8d80b26
No related branches found
No related tags found
1 merge request!144Revert
...@@ -298,7 +298,7 @@ test-frontend: ...@@ -298,7 +298,7 @@ test-frontend:
- build-frontend - build-frontend
script: script:
- "make test-frontend" - "make test-frontend"
- "cat ./fda-analyse-service/coverage.txt | grep -o 'TOTAL[^%]*%'" - "cat ./fda-ui/coverage.txt | grep -o 'Lines[^%]*%'"
artifacts: artifacts:
when: always when: always
paths: paths:
......
...@@ -190,6 +190,7 @@ coverage-frontend: build-frontend ...@@ -190,6 +190,7 @@ coverage-frontend: build-frontend
test-frontend: clean build-frontend test-frontend: clean build-frontend
yarn --cwd ./fda-ui install yarn --cwd ./fda-ui install
yarn --cwd ./fda-ui run test:unit || true yarn --cwd ./fda-ui run test:unit || true
yarn --cwd ./fda-ui run coverage || true
clean: clean:
docker system prune -f --volumes docker system prune -f --volumes
......
...@@ -21,6 +21,7 @@ lib-cov ...@@ -21,6 +21,7 @@ lib-cov
# Coverage directory used by tools like istanbul # Coverage directory used by tools like istanbul
coverage/ coverage/
coverage.txt
# nyc test coverage # nyc test coverage
.nyc_output .nyc_output
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"branches": 35, "branches": 35,
"check-coverage": true, "check-coverage": true,
"include": [ "components/**/*.vue", "layouts/**/*.vue", "pages/**/*.vue", "server-middleware/**/*.js", "store/**/*.js"], "include": [ "components/**/*.vue", "layouts/**/*.vue", "pages/**/*.vue", "server-middleware/**/*.js", "store/**/*.js"],
"exclude": ["node_modules"], "exclude": ["node_modules", "server-middleware", "store"],
"extension": [".js", ".vue"], "extension": [".js", ".vue"],
"reporter": [ "reporter": [
"lcov", "lcov",
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"ver": "nuxt --version", "ver": "nuxt --version",
"lint:js": "eslint --ext .js,.vue --ignore-path .gitignore .", "lint:js": "eslint --ext .js,.vue --ignore-path .gitignore .",
"lint": "yarn lint:js", "lint": "yarn lint:js",
"coverage": "nyc ava test/unit/**/* test/specs/**/*", "coverage": "nyc ava test/unit/**/* test/specs/**/* > ./coverage.txt",
"test:unit": "ava test/unit/**/* test/specs/**/*", "test:unit": "ava test/unit/**/* test/specs/**/*",
"test:watch": "ava --watch test/unit/**/* test/specs/**/*", "test:watch": "ava --watch test/unit/**/* test/specs/**/*",
"test:e2e": "yarn clean && cross-env PORT=3001 ava --timeout=2h --fail-fast test/e2e/**", "test:e2e": "yarn clean && cross-env PORT=3001 ava --timeout=2h --fail-fast test/e2e/**",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment