Skip to content

Commit 822a323

Browse files
author
John Doe
committed
chore: add coverage to existing test targets
1 parent ad988ab commit 822a323

File tree

15 files changed

+61
-21
lines changed

15 files changed

+61
-21
lines changed

code-pushup.preset.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,7 @@ export const coverageCoreConfigNx = async (
184184
throw new Error('coverageCoreConfigNx for single projects not implemented');
185185
}
186186
const targetNames = ['unit-test', 'int-test'];
187-
const targetArgs = [
188-
'-t',
189-
...targetNames,
190-
'--coverage.enabled',
191-
'--skipNxCache',
192-
];
187+
const targetArgs = ['-t', ...targetNames];
193188
return {
194189
plugins: [
195190
await coveragePlugin({

nx.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,20 @@
1818
"cache": true,
1919
"executor": "@nx/vite:test",
2020
"options": {
21-
"configFile": "{projectRoot}/vitest.unit.config.ts"
21+
"configFile": "{projectRoot}/vitest.unit.config.ts",
22+
"coverage": {
23+
"enabled": true
24+
}
2225
}
2326
},
2427
"int-test": {
2528
"cache": true,
2629
"executor": "@nx/vite:test",
2730
"options": {
28-
"configFile": "{projectRoot}/vitest.int.config.ts"
31+
"configFile": "{projectRoot}/vitest.int.config.ts",
32+
"coverage": {
33+
"enabled": true
34+
}
2935
}
3036
},
3137
"lint": {

packages/ci/project.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"int-test": {
1111
"executor": "@nx/vite:test",
1212
"options": {
13-
"configFile": "{projectRoot}/vitest.int.config.ts"
13+
"configFile": "{projectRoot}/vitest.int.config.ts",
14+
"coverage": {
15+
"enabled": true
16+
}
1417
}
1518
}
1619
},

packages/cli/project.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"int-test": {
1111
"executor": "@nx/vite:test",
1212
"options": {
13-
"configFile": "{projectRoot}/vitest.int.config.ts"
13+
"configFile": "{projectRoot}/vitest.int.config.ts",
14+
"coverage": {
15+
"enabled": true
16+
}
1417
}
1518
},
1619
"run-help": {

packages/core/project.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"int-test": {
1111
"executor": "@nx/vite:test",
1212
"options": {
13-
"configFile": "{projectRoot}/vitest.int.config.ts"
13+
"configFile": "{projectRoot}/vitest.int.config.ts",
14+
"coverage": {
15+
"enabled": true
16+
}
1417
}
1518
}
1619
},

packages/create-cli/project.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"int-test": {
1111
"executor": "@nx/vite:test",
1212
"options": {
13-
"configFile": "{projectRoot}/vitest.int.config.ts"
13+
"configFile": "{projectRoot}/vitest.int.config.ts",
14+
"coverage": {
15+
"enabled": true
16+
}
1417
}
1518
},
1619
"exec-node": {

packages/models/project.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
"int-test": {
2323
"executor": "@nx/vite:test",
2424
"options": {
25-
"configFile": "{projectRoot}/vitest.int.config.ts"
25+
"configFile": "{projectRoot}/vitest.int.config.ts",
26+
"coverage": {
27+
"enabled": true
28+
}
2629
}
2730
}
2831
},

packages/nx-plugin/project.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
"int-test": {
4646
"executor": "@nx/vite:test",
4747
"options": {
48-
"configFile": "{projectRoot}/vitest.int.config.ts"
48+
"configFile": "{projectRoot}/vitest.int.config.ts",
49+
"coverage": {
50+
"enabled": true
51+
}
4952
}
5053
}
5154
},

packages/plugin-coverage/project.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"int-test": {
1111
"executor": "@nx/vite:test",
1212
"options": {
13-
"configFile": "{projectRoot}/vitest.int.config.ts"
13+
"configFile": "{projectRoot}/vitest.int.config.ts",
14+
"coverage": {
15+
"enabled": true
16+
}
1417
}
1518
}
1619
},

packages/plugin-eslint/project.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
"int-test": {
1111
"executor": "@nx/vite:test",
1212
"options": {
13-
"configFile": "{projectRoot}/vitest.int.config.ts"
13+
"configFile": "{projectRoot}/vitest.int.config.ts",
14+
"coverage": {
15+
"enabled": true
16+
}
1417
}
1518
}
1619
},

0 commit comments

Comments
 (0)