Skip to content

Commit 11706c3

Browse files
committed
build: activate coverage reports
1 parent 1c28205 commit 11706c3

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: npm audit --audit-level=high
3737
continue-on-error: true
3838
- name: Lint and test
39-
run: npm test
39+
run: npm run test:ci
4040
- name: Confirm integration
4141
if: ${{ success() }}
4242
run: npm run test:integration

jest.config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ const baseConfig = {
1919
};
2020

2121
export default {
22+
collectCoverageFrom: [
23+
'src/**/*.ts',
24+
'!src/**/.*/**',
25+
'!src/cli.ts',
26+
'!src/declarations*'
27+
],
28+
coverageThreshold: {
29+
global: {
30+
branches: 75,
31+
functions: 75,
32+
lines: 85,
33+
statements: 85
34+
}
35+
},
2236
projects: [
2337
{
2438
displayName: 'unit',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"start:dev": "tsx watch src/cli.ts --verbose --log-stderr",
3434
"test": "npm run test:spell && npm run test:spell-docs && npm run test:lint && npm run test:types && jest --selectProjects unit --roots=src/",
3535
"test:audit": "jest --selectProjects audit --roots=tests/audit/",
36+
"test:ci": "npm test -- --coverage",
3637
"test:dev": "npm test -- --watchAll",
3738
"test:integration": "npm run build && NODE_OPTIONS='--experimental-vm-modules' jest --selectProjects e2e --roots=tests/e2e/",
3839
"test:integration-dev": "npm run test:integration -- --watchAll",

0 commit comments

Comments
 (0)