@systemfsoftware/stryker-js-vitest-runner 7.2.1 → 7.3.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/CHANGELOG.md +20 -0
- package/README.md +13 -0
- package/dist/index.mjs +1 -1
- package/dist/main.mjs +542 -146
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-vitest-runner
|
|
2
2
|
|
|
3
|
+
## 7.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- The test runner accepts a new `pool` option. When it is `threads`, a Vitest config that enables browser mode for any project is refused at startup with a message naming `testRunner: 'vitest'`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- A run whose selected files produce no mutants, for example because no loaded framework claims them, now runs every test in the dry run and finishes with an empty report. With `testRunner: 'vm'` or `'vitest'` it used to fail with "No tests were executed", because the dry run only looked for tests related to those files. The dry run now relates tests only to the files that carry mutants.
|
|
12
|
+
|
|
13
|
+
- A failed dry run now names every failing test. The runner used to apply the bail setting to the dry run as well, so Vitest stopped at the first failure and the error listed only that test. Mutant runs still stop at the first failing test unless `disableBail` is set.
|
|
14
|
+
|
|
15
|
+
- A test file that fails as a whole — a suite that registers no tests, a file that throws while loading, or a `beforeAll`/`afterAll` hook that fails — is now reported as a failing test carrying the file's own message. A mutant that breaks a file this way is reported as Killed instead of Surviving, and a dry run that loads such a file fails naming it.
|
|
16
|
+
|
|
17
|
+
Skipped tests that never start are now reported as skipped rather than dropped from the run's results.
|
|
18
|
+
|
|
19
|
+
A mutant run whose related files match no test file no longer stops with a test-runner crash; the run continues with no test able to kill the mutant.
|
|
20
|
+
|
|
21
|
+
- Mutation runs with `testRunner: 'vm'` finish in about half the time, with the same verdicts. The engine checks mutant groups on every checker process at once, stops the checkers as soon as checking ends, hands their share of `concurrency` to the test runners, and shares a Node compile cache with every worker it starts. The Vitest runner starts the next isolated worker thread while the current test file runs, so each file still gets a fresh thread but no longer waits for one to boot. On a 319-mutant TypeScript project with the TypeScript checker, a run went from 24.9 s to 12.6 s.
|
|
22
|
+
|
|
3
23
|
## 7.2.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -51,6 +51,19 @@ export default defineConfig({
|
|
|
51
51
|
})
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
### Worker pool
|
|
55
|
+
|
|
56
|
+
The runner uses the pool your Vitest config selects. Set `pool: 'threads'` in the runner's options to run every test file on Vitest's isolated `threads` pool instead, with no child processes. This is what `testRunner: 'vm'` in `@systemfsoftware/stryker-js` does. With `pool` set, a Vitest config that enables browser mode for any project is refused at startup; leave `pool` unset to run browser-mode suites.
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
export default defineConfig({
|
|
60
|
+
testRunner: {
|
|
61
|
+
plugin: '@systemfsoftware/stryker-js-vitest-runner',
|
|
62
|
+
options: { pool: 'threads' },
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
```
|
|
66
|
+
|
|
54
67
|
## In-Source Tests (`import.meta.vitest`)
|
|
55
68
|
|
|
56
69
|
If your project uses in-source testing with `if (import.meta.vitest)` blocks, add the companion ignorer plugin so unreachable test mutants are excluded from your score:
|
package/dist/index.mjs
CHANGED