Skip to content

Commit a01f01b

Browse files
chore: fix coverage
1 parent e434e98 commit a01f01b

File tree

12 files changed

+207
-36
lines changed

12 files changed

+207
-36
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
run: npm ci --ignore-scripts
8787

8888
- name: Prepare environment for tests
89-
run: npm run build
89+
run: npm run build -- --sourceMap true
9090

9191
- name: Run tests and generate coverage
9292
run: npm run test:coverage -- --ci
@@ -127,7 +127,7 @@ jobs:
127127
run: npm ci
128128

129129
- name: Prepare environment for tests
130-
run: npm run build
130+
run: npm run build -- --sourceMap true
131131

132132
- name: Run smoketests
133133
run: npm run test:smoketests

.nycrc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
2-
"include": ["packages/**"],
3-
"reporter": ["html", "json", "cobertura"],
4-
"source-map": true,
2+
"all": true,
3+
"extension": [".ts", ".js"],
4+
"include": ["packages/*/src/**/*.ts", "packages/*/lib/**/*.js"],
5+
"require": ["source-map-support/register"],
6+
"reporter": ["text", "html", "lcov"],
7+
"sourceMap": true,
8+
"clean": false,
59
"exclude-after-remap": false
610
}

jest.config.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
module.exports = {
22
testEnvironment: "node",
3-
collectCoverage: true,
4-
coverageDirectory: ".nyc_output",
3+
collectCoverageFrom: ["packages/*/src/**/*.ts"],
4+
coverageDirectory: ".jest_coverage",
55
coverageReporters: ["json"],
6-
coveragePathIgnorePatterns: ["<rootDir>/test/"],
76
transform: {
8-
"^.+\\.(ts)?$": "ts-jest",
7+
"^.+\\.tsx?$": [
8+
"ts-jest",
9+
{
10+
useESM: true,
11+
tsconfig: "tsconfig.json",
12+
},
13+
],
914
},
1015
testRegex: ["/test/.*\\.(test.js|test.cjs|test.mjs|test.ts|test.cts|test.mts)$"],
1116
moduleFileExtensions: ["ts", "cts", "mts", "js", "cjs", "mjs", "json"],

0 commit comments

Comments
 (0)