Skip to content

Commit

Permalink
Updated jest Config: adding coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Vidit-Kushwaha committed Jun 30, 2024
1 parent 473069f commit c10a1f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ on: [pull_request, push]
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install node
uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: '18.x'

- name: Install dependencies
run: npm install
run: npm install

- name: Test
run: npm run test

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
- run: npx coveralls < coverage/lcov.info
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
3 changes: 3 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ const config: Config.InitialOptions = {
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
'^.+\\.svg$': 'jest-transformer-svg',
},
collectCoverage: true,
coverageReporters: ['lcov', 'text'],
coverageDirectory: './coverage'
}
export default config

0 comments on commit c10a1f0

Please sign in to comment.