@forsakringskassan/vitest-config 2.2.8 → 2.4.0
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/index.js +16 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5,7 +5,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __commonJS = (cb, mod2) => function __require() {
|
|
8
|
-
|
|
8
|
+
try {
|
|
9
|
+
return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
|
|
10
|
+
} catch (e2) {
|
|
11
|
+
throw mod2 = 0, e2;
|
|
12
|
+
}
|
|
9
13
|
};
|
|
10
14
|
var __copyProps = (to, from, except, desc) => {
|
|
11
15
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -363,17 +367,27 @@ function filterResult(coverage) {
|
|
|
363
367
|
|
|
364
368
|
// src/index.ts
|
|
365
369
|
var import_deepmerge = __toESM(require_cjs(), 1);
|
|
370
|
+
var isGithub = process.env.GITHUB_ACTIONS === "true";
|
|
371
|
+
var githubReporter = isGithub ? ["github-actions"] : [];
|
|
366
372
|
function overwriteMerge(_a, b2) {
|
|
367
373
|
return b2;
|
|
368
374
|
}
|
|
369
375
|
function defineTestConfig(userConfig = {}) {
|
|
370
376
|
const defaultConfig = {
|
|
377
|
+
/* up to 10x faster on windows */
|
|
378
|
+
pool: "threads",
|
|
371
379
|
coverage: {
|
|
372
380
|
provider: mod,
|
|
373
381
|
reporter: ["text", "text-summary", "lcov"],
|
|
374
382
|
include: ["src/**/*.[jt]s"],
|
|
375
383
|
exclude: ["**/index.[jt]s"]
|
|
376
|
-
}
|
|
384
|
+
},
|
|
385
|
+
reporters: [
|
|
386
|
+
"default",
|
|
387
|
+
["junit", { suiteName: "Vitest tests" }],
|
|
388
|
+
...githubReporter
|
|
389
|
+
],
|
|
390
|
+
outputFile: "./test-results/vitest-junit.xml"
|
|
377
391
|
};
|
|
378
392
|
const resolvedConfig = userConfig ? (0, import_deepmerge.default)(defaultConfig, userConfig, { arrayMerge: overwriteMerge }) : defaultConfig;
|
|
379
393
|
return resolvedConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/vitest-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Försäkringskassan shareable config for Vitest",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vitest"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"node": ">= 22.12.0",
|
|
38
38
|
"npm": ">= 10.0.0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "d9743925effe6a2be11730fb7e87e9cfec7cbc7d"
|
|
41
41
|
}
|