@vitest/coverage-istanbul 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/provider.js +7 -3
- package/package.json +3 -3
package/dist/provider.js
CHANGED
@@ -249,7 +249,8 @@ class IstanbulCoverageProvider extends BaseCoverageProvider {
|
|
249
249
|
const resolvedThresholds = this.resolveThresholds({
|
250
250
|
coverageMap,
|
251
251
|
thresholds: this.options.thresholds,
|
252
|
-
createCoverageMap: () => libCoverage.createCoverageMap({})
|
252
|
+
createCoverageMap: () => libCoverage.createCoverageMap({}),
|
253
|
+
root: this.ctx.config.root
|
253
254
|
});
|
254
255
|
this.checkThresholds({
|
255
256
|
thresholds: resolvedThresholds,
|
@@ -268,8 +269,11 @@ class IstanbulCoverageProvider extends BaseCoverageProvider {
|
|
268
269
|
});
|
269
270
|
}
|
270
271
|
}
|
271
|
-
|
272
|
-
|
272
|
+
const keepResults = !this.options.cleanOnRerun && this.ctx.config.watch;
|
273
|
+
if (!keepResults) {
|
274
|
+
this.coverageFiles = /* @__PURE__ */ new Map();
|
275
|
+
await promises.rm(this.coverageFilesDirectory, { recursive: true });
|
276
|
+
}
|
273
277
|
}
|
274
278
|
async getCoverageMapForUncoveredFiles(coveredFiles) {
|
275
279
|
const allFiles = await this.testExclude.glob(this.ctx.config.root);
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/coverage-istanbul",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.5.
|
4
|
+
"version": "1.5.2",
|
5
5
|
"description": "Istanbul coverage provider for Vitest",
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
7
7
|
"license": "MIT",
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"dist"
|
38
38
|
],
|
39
39
|
"peerDependencies": {
|
40
|
-
"vitest": "1.5.
|
40
|
+
"vitest": "1.5.2"
|
41
41
|
},
|
42
42
|
"dependencies": {
|
43
43
|
"debug": "^4.3.4",
|
@@ -58,7 +58,7 @@
|
|
58
58
|
"@types/istanbul-lib-source-maps": "^4.0.4",
|
59
59
|
"@types/istanbul-reports": "^3.0.4",
|
60
60
|
"pathe": "^1.1.1",
|
61
|
-
"vitest": "1.5.
|
61
|
+
"vitest": "1.5.2"
|
62
62
|
},
|
63
63
|
"scripts": {
|
64
64
|
"build": "rimraf dist && rollup -c",
|