Skip to content

Commit 91034cf

Browse files
authored
Merge pull request #234 from ably/fix/unit-test-coverage
Fix unit test coverage reporting and set realistic thresholds
2 parents 41c1c26 + 969377b commit 91034cf

File tree

3 files changed

+8
-36
lines changed

3 files changed

+8
-36
lines changed

.nycrc.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
33
"declaration": true,
4+
"sourceMap": true,
45
"module": "NodeNext",
56
"outDir": "./dist",
67
"strict": true,

vitest.config.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,20 @@ export default defineConfig({
1111
coverage: {
1212
provider: "v8",
1313
reporter: ["text", "html", "lcov"],
14-
include: ["src/**/*.ts"],
14+
reportOnFailure: true,
15+
include: ["src/**/*.ts", "dist/src/**/*.js"],
1516
exclude: [
1617
"src/**/*.d.ts",
1718
"src/**/index.ts",
19+
"dist/src/**/index.js",
1820
"**/*.test.ts",
1921
"**/*.spec.ts",
2022
],
2123
thresholds: {
22-
lines: 75,
23-
functions: 75,
24-
branches: 65,
25-
statements: 75,
24+
lines: 60,
25+
functions: 60,
26+
branches: 55,
27+
statements: 60,
2628
},
2729
},
2830

0 commit comments

Comments
 (0)