diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 32e175298..63b65ca4e 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -16,7 +16,7 @@ jobs: - name: Run lint run: yarn lint --fix - name: Run Unit Tests - run: yarn test:unit + run: yarn test:unit:coverage - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: diff --git a/README.md b/README.md index 04e6001aa..8aa5eaa7a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![codecov](https://codecov.io/gh/weni-ai/ia-platform-frontend/branch/main/graph/badge.svg)](https://codecov.io/gh/weni-ai/ia-platform-frontend) [![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0) +[![codecov](https://codecov.io/github/weni-ai/ia-platform-frontend/graph/badge.svg?token=KKE4WY9NBQ)](https://codecov.io/github/weni-ai/ia-platform-frontend) [![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0) *This project is a module of [Weni](https://github.com/weni-ai) integrated inside [Weni WebApp (Connect)](https://github.com/weni-ai/weni-webapp)* diff --git a/jest.config.js b/jest.config.js index db961d3b4..7a1fb84a7 100644 --- a/jest.config.js +++ b/jest.config.js @@ -38,6 +38,8 @@ const config = { '.*\\.(js)$': 'babel-jest', }, automock: false, + coverageReporters: ['text', 'json'], + coverageDirectory: '../tests/unit/coverage', }; module.exports = config; diff --git a/package.json b/package.json index 39f7d8bc1..98dde2e08 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "start": "concurrently \"node --watch mock/server.mjs\" \"vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint\"", "build": "vue-cli-service build", "test:unit": "vue-cli-service test:unit", + "test:unit:coverage": "vue-cli-service test:unit --coverage", "lint": "vue-cli-service lint" }, "dependencies": {