mootant 0.2.0 → 0.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/bin/mootant.js +3 -2
- package/dist/adapters/jest/collect-jest-dependencies.d.ts +8 -6
- package/dist/adapters/jest/collect-jest-dependencies.js +20 -14
- package/dist/adapters/jest/get-jest-cache-inputs.d.ts +14 -13
- package/dist/adapters/jest/index.d.ts +3 -1
- package/dist/adapters/jest/run-dry.js +20 -20
- package/dist/adapters/jest/start-jest-session.d.ts +6 -2
- package/dist/adapters/jest/start-jest-session.js +9 -2
- package/dist/adapters/jest/types/jest-handle.d.ts +2 -1
- package/dist/adapters/jest/types/jest-record.d.ts +4 -3
- package/dist/adapters/jest/types/worker-channel.d.ts +7 -0
- package/dist/adapters/jest/worker/boot-worker.d.ts +5 -4
- package/dist/adapters/jest/worker/create-test-runner.d.ts +4 -1
- package/dist/adapters/jest/worker/keep-reset-loads.d.ts +13 -0
- package/dist/adapters/jest/worker/list-runtime-files.d.ts +13 -0
- package/dist/adapters/jest/worker/run-unit.d.ts +25 -20
- package/dist/adapters/jest/worker/vm-setup.js +1 -1
- package/dist/adapters/jest/worker/worker.js +1 -1
- package/dist/adapters/node-test/check-typescript.js +2 -2
- package/dist/adapters/node-test/collect-node-dependencies.d.ts +7 -5
- package/dist/adapters/node-test/collect-node-dependencies.js +26 -20
- package/dist/adapters/node-test/create-spare-processes.d.ts +26 -0
- package/dist/adapters/node-test/create-spare-processes.js +53 -0
- package/dist/adapters/node-test/filter-exec-argv.d.ts +2 -1
- package/dist/adapters/node-test/filter-exec-argv.js +13 -12
- package/dist/adapters/node-test/get-node-cache-inputs.js +1 -1
- package/dist/adapters/node-test/get-unit-deadline.d.ts +6 -5
- package/dist/adapters/node-test/index.d.ts +2 -2
- package/dist/adapters/node-test/index.js +1 -0
- package/dist/adapters/node-test/is-group-alive.d.ts +8 -0
- package/dist/adapters/node-test/is-group-alive.js +8 -0
- package/dist/adapters/node-test/list-setup-files.js +2 -2
- package/dist/adapters/node-test/place-preload.d.ts +2 -1
- package/dist/adapters/node-test/place-preload.js +24 -18
- package/dist/adapters/node-test/preload/create-commonjs-route.js +1 -1
- package/dist/adapters/node-test/preload/preload.js +54 -52
- package/dist/adapters/node-test/preload/read-line-sync.d.ts +11 -0
- package/dist/adapters/node-test/preload/read-line-sync.js +25 -0
- package/dist/adapters/node-test/preload/read-unit.d.ts +11 -5
- package/dist/adapters/node-test/preload/read-unit.js +5 -4
- package/dist/adapters/node-test/run-isolated.d.ts +19 -10
- package/dist/adapters/node-test/run-isolated.js +68 -52
- package/dist/adapters/node-test/run-test-file.d.ts +12 -4
- package/dist/adapters/node-test/run-test-file.js +18 -14
- package/dist/adapters/node-test/run-test-process.d.ts +30 -13
- package/dist/adapters/node-test/run-test-process.js +38 -40
- package/dist/adapters/node-test/start-node-test-session.d.ts +10 -2
- package/dist/adapters/node-test/start-node-test-session.js +90 -84
- package/dist/adapters/node-test/start-test-process.d.ts +30 -0
- package/dist/adapters/node-test/start-test-process.js +27 -0
- package/dist/adapters/node-test/types/node-test-handle.d.ts +14 -1
- package/dist/adapters/node-test/types/process-watch.d.ts +4 -3
- package/dist/adapters/node-test/types/spare-processes.d.ts +20 -0
- package/dist/adapters/node-test/types/test-process-outcome.d.ts +8 -1
- package/dist/adapters/shared/allows-spares.d.ts +11 -0
- package/dist/adapters/shared/allows-spares.js +23 -0
- package/dist/adapters/shared/create-environment-proxy.d.ts +4 -3
- package/dist/adapters/shared/create-input-filter.d.ts +17 -14
- package/dist/adapters/shared/create-input-filter.js +2 -2
- package/dist/adapters/shared/enable-compile-cache.d.ts +32 -0
- package/dist/adapters/shared/enable-compile-cache.js +7 -0
- package/dist/adapters/shared/find-tsconfig-property.d.ts +13 -0
- package/dist/adapters/shared/find-tsconfig-property.js +6 -0
- package/dist/adapters/shared/get-spare-limit.d.ts +10 -0
- package/dist/adapters/shared/get-spare-limit.js +5 -0
- package/dist/adapters/shared/index-environment-hashes.d.ts +2 -2
- package/dist/adapters/shared/index-environment-hashes.js +5 -13
- package/dist/adapters/{node-test → shared}/list-flag-values.d.ts +2 -1
- package/dist/adapters/shared/list-flag-values.js +10 -0
- package/dist/adapters/shared/list-tsconfig-files.d.ts +14 -5
- package/dist/adapters/shared/list-tsconfig-files.js +15 -13
- package/dist/adapters/shared/parse-tsconfig.d.ts +10 -0
- package/dist/adapters/shared/parse-tsconfig.js +19 -0
- package/dist/adapters/shared/read-flag-name.d.ts +9 -0
- package/dist/adapters/shared/read-flag-name.js +5 -0
- package/dist/adapters/shared/read-node-options.d.ts +11 -0
- package/dist/adapters/shared/read-node-options.js +6 -0
- package/dist/adapters/shared/read-prefork-switch.d.ts +10 -0
- package/dist/adapters/shared/read-prefork-switch.js +5 -0
- package/dist/adapters/shared/read-tsconfig-extends.d.ts +2 -5
- package/dist/adapters/shared/read-tsconfig-extends.js +16 -31
- package/dist/adapters/shared/read-tsconfig-references.d.ts +12 -0
- package/dist/adapters/shared/read-tsconfig-references.js +13 -0
- package/dist/adapters/shared/track-file-reads.d.ts +13 -12
- package/dist/adapters/shared/track-file-reads.js +71 -71
- package/dist/adapters/shared/track-process-group.d.ts +2 -1
- package/dist/adapters/shared/track-process-group.js +7 -2
- package/dist/adapters/vitest/build-isolated-facts.d.ts +4 -3
- package/dist/adapters/vitest/collect-dependencies.d.ts +11 -5
- package/dist/adapters/vitest/collect-dependencies.js +36 -27
- package/dist/adapters/vitest/configure-project.d.ts +3 -2
- package/dist/adapters/vitest/configure-project.js +1 -1
- package/dist/adapters/vitest/create-forks-pool.d.ts +34 -7
- package/dist/adapters/vitest/create-forks-pool.js +102 -24
- package/dist/adapters/vitest/create-interleaved-sequencer.d.ts +3 -2
- package/dist/adapters/vitest/drop-signal-listeners.d.ts +14 -0
- package/dist/adapters/vitest/drop-signal-listeners.js +15 -0
- package/dist/adapters/vitest/get-cache-inputs.d.ts +3 -1
- package/dist/adapters/vitest/get-cache-inputs.js +43 -28
- package/dist/adapters/vitest/get-module-file.d.ts +3 -5
- package/dist/adapters/vitest/get-module-file.js +1 -1
- package/dist/adapters/vitest/get-spare-key.d.ts +15 -0
- package/dist/adapters/vitest/get-spare-key.js +15 -0
- package/dist/adapters/vitest/index.d.ts +2 -1
- package/dist/adapters/vitest/index.js +1 -0
- package/dist/adapters/vitest/is-virtual-module.d.ts +1 -2
- package/dist/adapters/vitest/is-virtual-module.js +1 -1
- package/dist/adapters/vitest/list-script-defines.d.ts +13 -0
- package/dist/adapters/vitest/list-script-defines.js +22 -0
- package/dist/adapters/vitest/read-unit-inputs.d.ts +2 -1
- package/dist/adapters/vitest/run-dry.js +1 -1
- package/dist/adapters/vitest/run-plan.d.ts +10 -8
- package/dist/adapters/vitest/run-plan.js +1 -1
- package/dist/adapters/vitest/run-specifications.d.ts +9 -2
- package/dist/adapters/vitest/run-specifications.js +22 -12
- package/dist/adapters/vitest/runner.d.ts +60 -29
- package/dist/adapters/vitest/runner.js +109 -86
- package/dist/adapters/vitest/start-vitest-session.d.ts +5 -1
- package/dist/adapters/vitest/start-vitest-session.js +64 -59
- package/dist/adapters/vitest/stop-hung-worker.d.ts +11 -4
- package/dist/adapters/vitest/stop-hung-worker.js +20 -7
- package/dist/adapters/vitest/types/mootant-forks-pool.d.ts +47 -0
- package/dist/adapters/vitest/types/vitest-session-state.d.ts +9 -8
- package/dist/adapters/vitest/types/vitest-worker.d.ts +48 -33
- package/dist/adapters/vitest/wait-for-workers.d.ts +5 -2
- package/dist/adapters/vitest/wait-for-workers.js +15 -15
- package/dist/adapters/vitest/worker/track-meta-defines.d.ts +39 -0
- package/dist/adapters/vitest/worker/track-meta-defines.js +23 -0
- package/dist/adapters/vitest/worker/track-values.d.ts +38 -0
- package/dist/adapters/vitest/worker/track-values.js +45 -0
- package/dist/adapters/vitest/worker/value-prefixes.d.ts +12 -0
- package/dist/adapters/vitest/worker/value-prefixes.js +6 -0
- package/dist/adapters/vitest/worker/wait-for-turn.d.ts +8 -6
- package/dist/adapters/vitest/worker/watch-property.d.ts +17 -0
- package/dist/adapters/vitest/worker/watch-property.js +27 -0
- package/dist/cli/create-run-progress.d.ts +8 -1
- package/dist/cli/create-run-progress.js +4 -1
- package/dist/cli/ensure-exit.d.ts +11 -0
- package/dist/cli/ensure-exit.js +15 -0
- package/dist/cli/html/build-html-report.js +1 -0
- package/dist/cli/html/client/main.js +1 -1
- package/dist/cli/html/client/render-overview.d.ts +3 -3
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +3 -2
- package/dist/cli/parse-arguments.d.ts +4 -0
- package/dist/cli/parse-arguments.js +4 -1
- package/dist/cli/report/build-run-report.js +1 -0
- package/dist/cli/report/format-command.d.ts +5 -0
- package/dist/cli/report/format-command.js +1 -1
- package/dist/cli/report/format-run-text-report.d.ts +5 -4
- package/dist/cli/report/format-run-text-report.js +10 -10
- package/dist/cli/report/slim-run-report.d.ts +10 -10
- package/dist/cli/report/slim-run-report.js +1 -0
- package/dist/cli/run-mutation.d.ts +5 -1
- package/dist/cli/run-mutation.js +32 -24
- package/dist/cli/terminal/create-spinner.d.ts +1 -2
- package/dist/cli/terminal/create-spinner.js +23 -32
- package/dist/cli/watch-interrupts.d.ts +41 -0
- package/dist/cli/watch-interrupts.js +32 -0
- package/dist/core/cache/apply-cached-units.d.ts +8 -7
- package/dist/core/cache/build-hash.d.ts +9 -0
- package/dist/core/cache/build-hash.js +2 -0
- package/dist/core/cache/cache-version.d.ts +4 -4
- package/dist/core/cache/check-dry-snapshot.d.ts +25 -0
- package/dist/core/cache/check-dry-snapshot.js +13 -0
- package/dist/core/cache/create-dry-reuse-miss.d.ts +12 -0
- package/dist/core/cache/create-dry-reuse-miss.js +7 -0
- package/dist/core/cache/create-dry-snapshot.d.ts +71 -0
- package/dist/core/cache/create-dry-snapshot.js +27 -0
- package/dist/core/cache/create-run-cache.d.ts +20 -2
- package/dist/core/cache/create-run-cache.js +31 -22
- package/dist/core/cache/create-snapshot-session.d.ts +12 -0
- package/dist/core/cache/create-snapshot-session.js +19 -0
- package/dist/core/cache/get-build-id.d.ts +11 -0
- package/dist/core/cache/get-build-id.js +7 -0
- package/dist/core/cache/get-cache-path.d.ts +1 -1
- package/dist/core/cache/get-cache-path.js +1 -1
- package/dist/core/cache/get-dry-snapshot-key.d.ts +47 -0
- package/dist/core/cache/get-dry-snapshot-key.js +43 -0
- package/dist/core/cache/get-dry-snapshot-path.d.ts +9 -0
- package/dist/core/cache/get-dry-snapshot-path.js +5 -0
- package/dist/core/cache/get-environment-key.d.ts +9 -4
- package/dist/core/cache/get-environment-key.js +3 -2
- package/dist/core/cache/get-test-file-keys.d.ts +2 -1
- package/dist/core/cache/get-test-file-keys.js +11 -10
- package/dist/core/cache/hash-files.d.ts +8 -7
- package/dist/core/cache/hash-files.js +17 -11
- package/dist/core/cache/hash-project-tree.d.ts +22 -0
- package/dist/core/cache/hash-project-tree.js +69 -0
- package/dist/core/cache/is-dry-reuse-miss.d.ts +8 -0
- package/dist/core/cache/is-dry-reuse-miss.js +4 -0
- package/dist/core/cache/list-file-hashes.d.ts +4 -0
- package/dist/core/cache/list-file-hashes.js +5 -2
- package/dist/core/cache/list-install-states.d.ts +12 -0
- package/dist/core/cache/list-install-states.js +19 -0
- package/dist/core/cache/list-variable-hashes.d.ts +15 -0
- package/dist/core/cache/list-variable-hashes.js +14 -0
- package/dist/core/cache/prepare-run-cache.d.ts +48 -22
- package/dist/core/cache/prepare-run-cache.js +86 -73
- package/dist/core/cache/read-dry-snapshot.d.ts +10 -0
- package/dist/core/cache/read-dry-snapshot.js +15 -0
- package/dist/core/cache/read-run-cache.js +6 -2
- package/dist/core/cache/save-dry-snapshot.d.ts +34 -0
- package/dist/core/cache/save-dry-snapshot.js +32 -0
- package/dist/core/cache/volatile-variables.d.ts +7 -0
- package/dist/core/cache/volatile-variables.js +11 -0
- package/dist/core/cache/write-run-cache.js +1 -1
- package/dist/core/config/load-typescript-config.d.ts +6 -1
- package/dist/core/config/load-typescript-config.js +26 -10
- package/dist/core/config/prepare-run.d.ts +7 -3
- package/dist/core/config/prepare-run.js +1 -0
- package/dist/core/config/resolve-run-settings.d.ts +3 -2
- package/dist/core/config/resolve-run-settings.js +1 -0
- package/dist/core/config/validate-config.js +3 -2
- package/dist/core/files/get-package-manifest.d.ts +12 -0
- package/dist/core/files/get-package-manifest.js +7 -0
- package/dist/core/generate/collect-candidates.d.ts +5 -1
- package/dist/core/generate/collect-candidates.js +125 -97
- package/dist/core/generate/generate-file-mutants.js +6 -5
- package/dist/core/index.d.ts +18 -0
- package/dist/core/mutators/shared/get-branch-copy-skip.d.ts +2 -2
- package/dist/core/mutators/shared/get-comparison-plan.d.ts +2 -2
- package/dist/core/mutators/shared/get-default-option-skip.d.ts +2 -2
- package/dist/core/mutators/shared/get-group-constant.d.ts +2 -2
- package/dist/core/mutators/shared/get-literal-skip.d.ts +3 -3
- package/dist/core/mutators/shared/get-loop-running-skip.d.ts +2 -2
- package/dist/core/mutators/shared/get-nullish-swap-skip.d.ts +2 -2
- package/dist/core/mutators/shared/get-or-default-skip.d.ts +2 -2
- package/dist/core/mutators/shared/get-owned-constants.d.ts +2 -2
- package/dist/core/mutators/shared/leave-now-skip.d.ts +2 -2
- package/dist/core/mutators/shared/no-op-callback-skip.d.ts +2 -2
- package/dist/core/plugins/create-mutator-registry.d.ts +4 -2
- package/dist/core/plugins/create-mutator-registry.js +15 -5
- package/dist/core/plugins/validate-plugin.d.ts +3 -3
- package/dist/core/plugins/validate-plugin.js +32 -10
- package/dist/core/regex/collect-pattern-changes.d.ts +2 -2
- package/dist/core/regex/create-regex-replacement.d.ts +2 -2
- package/dist/core/run/apply-isolated-result.d.ts +22 -14
- package/dist/core/run/apply-isolated-result.js +45 -26
- package/dist/core/run/count-run.d.ts +2 -1
- package/dist/core/run/create-run-state.d.ts +5 -0
- package/dist/core/run/create-run-state.js +1 -0
- package/dist/core/run/create-work-directory.d.ts +4 -1
- package/dist/core/run/create-work-directory.js +15 -12
- package/dist/core/run/decide-evidence.d.ts +4 -3
- package/dist/core/run/get-unit-evidence.d.ts +13 -7
- package/dist/core/run/get-unit-evidence.js +1 -1
- package/dist/core/run/guard-session.d.ts +18 -0
- package/dist/core/run/guard-session.js +30 -0
- package/dist/core/run/live-work-directories.d.ts +5 -0
- package/dist/core/run/live-work-directories.js +2 -0
- package/dist/core/run/read-isolated-unit.d.ts +6 -3
- package/dist/core/run/read-isolated-unit.js +77 -38
- package/dist/core/run/remove-live-work-directories.d.ts +7 -0
- package/dist/core/run/remove-live-work-directories.js +12 -0
- package/dist/core/run/run-isolated-rounds.d.ts +16 -12
- package/dist/core/run/run-isolated-rounds.js +3 -2
- package/dist/core/run/validate-adapter.d.ts +1 -1
- package/dist/core/run/validate-adapter.js +1 -1
- package/dist/core/run-mutants.d.ts +34 -2
- package/dist/core/run-mutants.js +356 -216
- package/dist/core/skips/skip-rules.d.ts +3 -1
- package/dist/package.js +1 -1
- package/dist/types/adapter/adapter-context.d.ts +20 -0
- package/dist/types/adapter/adapter-session.d.ts +2 -1
- package/dist/types/adapter/cache-inputs.d.ts +3 -2
- package/dist/types/adapter/dry-file.d.ts +4 -2
- package/dist/types/adapter/isolated-plan.d.ts +2 -1
- package/dist/types/adapter/isolated-result.d.ts +3 -1
- package/dist/types/adapter/run-inputs.d.ts +5 -4
- package/dist/types/adapter/test-adapter.d.ts +7 -0
- package/dist/types/cache/cache-entry.d.ts +9 -7
- package/dist/types/cache/cached-inputs.d.ts +2 -2
- package/dist/types/cache/dry-snapshot.d.ts +76 -0
- package/dist/types/cache/project-tree.d.ts +16 -0
- package/dist/types/cache/run-cache-file.d.ts +1 -1
- package/dist/types/cache/run-cache.d.ts +6 -5
- package/dist/types/config/plugin.d.ts +11 -2
- package/dist/types/config/run-config.d.ts +10 -0
- package/dist/types/config/run-settings.d.ts +6 -0
- package/dist/types/mutant/core-note.d.ts +12 -0
- package/dist/types/mutant/diagnostic.d.ts +1 -0
- package/dist/types/mutant/registered-skip-rule.d.ts +11 -0
- package/dist/types/mutant/skip-note.d.ts +7 -6
- package/dist/types/mutant/skip-rule-id.d.ts +3 -2
- package/dist/types/mutant/skip-rule.d.ts +2 -1
- package/dist/types/mutant/skipped-candidate.d.ts +14 -7
- package/dist/types/mutant/skipped-mutant.d.ts +6 -6
- package/dist/types/mutator/mutator.d.ts +3 -2
- package/dist/types/mutator/registered-mutator.d.ts +8 -0
- package/dist/types/regex/regex-change.d.ts +2 -2
- package/dist/types/report/html-report.d.ts +3 -2
- package/dist/types/report/list-report-skipped.d.ts +3 -2
- package/dist/types/report/run-report.d.ts +11 -2
- package/dist/types/report/slim-run-report.d.ts +1 -1
- package/dist/types/run/isolated-evidence.d.ts +3 -2
- package/dist/types/run/isolated-reason.d.ts +2 -1
- package/dist/types/run/run-durations.d.ts +8 -3
- package/dist/types/run/run-event.d.ts +10 -7
- package/dist/types/run/run-result.d.ts +11 -2
- package/dist/types/run/run-state.d.ts +21 -0
- package/dist/types/run/try-cause.d.ts +2 -1
- package/package.json +1 -1
- package/readme.md +85 -68
- package/skills/mootant/SKILL.md +36 -19
- package/skills/mootant/references/mutators.md +29 -23
- package/dist/adapters/node-test/list-flag-values.js +0 -9
- /package/dist/adapters/{node-test → shared}/loader-flags.d.ts +0 -0
- /package/dist/adapters/{node-test → shared}/loader-flags.js +0 -0
- /package/dist/{adapters/shared → core/files}/list-package-files.d.ts +0 -0
- /package/dist/{adapters/shared → core/files}/list-package-files.js +0 -0
- /package/dist/{adapters/shared → core/files}/read-package-type.d.ts +0 -0
- /package/dist/{adapters/shared → core/files}/read-package-type.js +0 -0
|
@@ -13,13 +13,23 @@ function n(n, i) {
|
|
|
13
13
|
return a;
|
|
14
14
|
}
|
|
15
15
|
function r(n, r, i) {
|
|
16
|
-
let a = i === null ? "the core plugin" : `plugin "${i}"`, o = i === null ? "" : `${i}
|
|
17
|
-
for (let
|
|
18
|
-
if (!t(
|
|
16
|
+
let a = i === null ? "the core plugin" : `plugin "${i}"`, o = i === null ? "" : `${i}/`, s = /* @__PURE__ */ new Map(), c = r.skipRules ?? {};
|
|
17
|
+
for (let n of Object.keys(c).toSorted(e)) {
|
|
18
|
+
if (!t(n)) throw Error(`Skip rule name "${n}" in ${a} is not kebab-case.`);
|
|
19
|
+
let { heuristic: e, category: r } = c[n];
|
|
20
|
+
s.set(n, {
|
|
21
|
+
id: `${o}${n}`,
|
|
22
|
+
heuristic: e,
|
|
23
|
+
category: r
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
for (let c of Object.keys(r.mutators).toSorted(e)) {
|
|
27
|
+
if (!t(c)) throw Error(`Mutator name "${c}" in ${a} is not kebab-case.`);
|
|
19
28
|
let e = {
|
|
20
|
-
|
|
29
|
+
...i !== null && { skipRules: s },
|
|
30
|
+
mutator: r.mutators[c],
|
|
21
31
|
rank: n.mutators.size,
|
|
22
|
-
id: `${o}${
|
|
32
|
+
id: `${o}${c}`
|
|
23
33
|
};
|
|
24
34
|
n.mutators.set(e.id, e);
|
|
25
35
|
}
|
|
@@ -2,9 +2,9 @@ import { Plugin } from '../../types/config/plugin.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Checks the shape of a plugin loaded at runtime: an object with a `mutators`
|
|
4
4
|
* object of mutators, each with a `create` function and a `meta` object with a
|
|
5
|
-
* description,
|
|
6
|
-
*
|
|
7
|
-
* registered.
|
|
5
|
+
* description, optional skip rules with a category and a heuristic flag, and
|
|
6
|
+
* optional presets with a description, mutator settings, `extends` and
|
|
7
|
+
* settings. Names and ids are checked when the plugin is registered.
|
|
8
8
|
*
|
|
9
9
|
* @param value - Default export of a plugin package, or a plugin object.
|
|
10
10
|
* @param namespace - Namespace the plugin is loaded under.
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { getSettingsProblem as e } from "./get-settings-problem.js";
|
|
2
2
|
import { isMutatorSetting as t } from "./is-mutator-setting.js";
|
|
3
3
|
import { isRecord as n } from "./is-record.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const r = {
|
|
5
|
+
equivalent: !0,
|
|
6
|
+
duplicate: !0,
|
|
7
|
+
subsumed: !0,
|
|
8
|
+
timeout: !0,
|
|
9
|
+
invalid: !0,
|
|
10
|
+
owned: !0,
|
|
11
|
+
noise: !0
|
|
12
|
+
};
|
|
13
|
+
function i(e, t) {
|
|
14
|
+
let n = o(e);
|
|
6
15
|
if (n !== null) throw Error(`Plugin "${t}" is invalid: ${n}.`);
|
|
7
16
|
return e;
|
|
8
17
|
}
|
|
9
|
-
function
|
|
18
|
+
function a(r) {
|
|
10
19
|
if (!n(r)) return "must be an object";
|
|
11
20
|
if (typeof r.description != "string") return "has no description";
|
|
12
21
|
if (!n(r.mutators)) return "has \"mutators\" that is not an object";
|
|
@@ -20,27 +29,40 @@ function i(r) {
|
|
|
20
29
|
}
|
|
21
30
|
return null;
|
|
22
31
|
}
|
|
23
|
-
function
|
|
32
|
+
function o(e) {
|
|
24
33
|
if (!n(e)) return "it must be an object";
|
|
25
34
|
if (!n(e.mutators)) return "\"mutators\" must be an object";
|
|
26
35
|
let t = Object.entries(e.mutators);
|
|
27
36
|
for (let [e, n] of t) {
|
|
28
|
-
let t =
|
|
37
|
+
let t = c(n);
|
|
29
38
|
if (t !== null) return `mutator "${e}" ${t}`;
|
|
30
39
|
}
|
|
40
|
+
let r = s(e.skipRules);
|
|
41
|
+
if (r !== null) return r;
|
|
31
42
|
if (e.presets === void 0) return null;
|
|
32
43
|
if (!n(e.presets)) return "\"presets\" must be an object";
|
|
33
|
-
let
|
|
34
|
-
for (let [e, t] of
|
|
35
|
-
let n =
|
|
44
|
+
let i = Object.entries(e.presets);
|
|
45
|
+
for (let [e, t] of i) {
|
|
46
|
+
let n = a(t);
|
|
36
47
|
if (n !== null) return `preset "${e}" ${n}`;
|
|
37
48
|
}
|
|
38
49
|
return null;
|
|
39
50
|
}
|
|
40
|
-
function
|
|
51
|
+
function s(e) {
|
|
52
|
+
if (e === void 0) return null;
|
|
53
|
+
if (!n(e)) return "\"skipRules\" must be an object";
|
|
54
|
+
for (let [t, i] of Object.entries(e)) {
|
|
55
|
+
if (!n(i)) return `skip rule "${t}" must be an object`;
|
|
56
|
+
let { category: e } = i;
|
|
57
|
+
if (typeof e != "string" || !Object.hasOwn(r, e)) return `skip rule "${t}" has an invalid category: use "equivalent", "noise", "timeout", "owned", "subsumed", "duplicate" or "invalid"`;
|
|
58
|
+
if (typeof i.heuristic != "boolean") return `skip rule "${t}" has heuristic that is not true or false`;
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
function c(e) {
|
|
41
63
|
if (!n(e)) return "must be an object";
|
|
42
64
|
if (typeof e.create != "function") return "has no create function";
|
|
43
65
|
let { meta: t } = e;
|
|
44
66
|
return !n(t) || typeof t.description != "string" ? "has no meta.description" : t.defaultOptions !== void 0 && !n(t.defaultOptions) ? "has meta.defaultOptions that is not an object" : t.countsForSolitary !== void 0 && typeof t.countsForSolitary != "boolean" ? "has meta.countsForSolitary that is not true or false" : null;
|
|
45
67
|
}
|
|
46
|
-
export {
|
|
68
|
+
export { i as validatePlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RegexPatternOptions } from '../../types/mutator/regex-pattern-options.js';
|
|
2
2
|
import { RegexSource } from '../../types/regex/regex-source.js';
|
|
3
3
|
import { RegexChange } from '../../types/regex/regex-change.js';
|
|
4
|
-
import {
|
|
4
|
+
import { CoreNote } from '../../types/mutant/core-note.js';
|
|
5
5
|
/**
|
|
6
6
|
* Lists the changes regex-pattern considers for a pattern, ordered by start
|
|
7
7
|
* and, for one start, outer first: removing `^` and `$`, `\b` and `\B`,
|
|
@@ -21,4 +21,4 @@ import { SkipNote } from '../../types/mutant/skip-note.js';
|
|
|
21
21
|
* pattern, when code only asks whether the pattern matches; null otherwise.
|
|
22
22
|
* @returns Changes with offsets relative to the pattern.
|
|
23
23
|
*/
|
|
24
|
-
export declare function collectPatternChanges(source: Pick<RegexSource, 'flags' | 'tree'>, options: Readonly<RegexPatternOptions>, testedSkip:
|
|
24
|
+
export declare function collectPatternChanges(source: Pick<RegexSource, 'flags' | 'tree'>, options: Readonly<RegexPatternOptions>, testedSkip: CoreNote | null): RegexChange[];
|
|
@@ -2,7 +2,7 @@ import { PresetSettings } from '../../types/config/preset-settings.js';
|
|
|
2
2
|
import { Replacement } from '../../types/mutator/replacement.js';
|
|
3
3
|
import { RegexSource } from '../../types/regex/regex-source.js';
|
|
4
4
|
import { TextEdit } from '../../types/source/text-edit.js';
|
|
5
|
-
import {
|
|
5
|
+
import { CoreNote } from '../../types/mutant/core-note.js';
|
|
6
6
|
/**
|
|
7
7
|
* Change of a regex mutant, with the skip the mutator decided.
|
|
8
8
|
*/
|
|
@@ -15,7 +15,7 @@ interface RegexEdit {
|
|
|
15
15
|
/**
|
|
16
16
|
* Skip the mutator decided, or null.
|
|
17
17
|
*/
|
|
18
|
-
skip:
|
|
18
|
+
skip: CoreNote | null;
|
|
19
19
|
/**
|
|
20
20
|
* New flags.
|
|
21
21
|
*/
|
|
@@ -6,20 +6,28 @@ import { IsolatedResult } from '../../types/adapter/isolated-result.js';
|
|
|
6
6
|
* hit limit, a hang, or a test or suite hook that ran out of time after the
|
|
7
7
|
* mutant was reached is a timeout that waits for a confirmation with doubled
|
|
8
8
|
* time, and past the hit limit with a raised one, or is final when the unit was
|
|
9
|
-
* one (`getUnitEvidence`); a crash
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* of its
|
|
9
|
+
* one (`getUnitEvidence`); a crash runs the unit once more with the limits it
|
|
10
|
+
* had and kills only when an earlier unit of the mutant in the test file
|
|
11
|
+
* crashed too, as something else can end its process; a load error, a failed
|
|
12
|
+
* suite hook or file teardown in a unit that reached the mutant, or a test that
|
|
13
|
+
* failed or threw a stray error after the mutant was reached kills; a unit that
|
|
14
|
+
* reached the mutant and passed is survived evidence. The dry run had no failed
|
|
15
|
+
* suite hook, since one fails the dry run. Stray errors of tests and test files
|
|
16
|
+
* that had them in the dry run prove nothing. A unit without facts is planned
|
|
17
|
+
* once more, then gives an `Error` verdict unless another file has evidence. So
|
|
18
|
+
* does an inconclusive unit, which something else stopped before the tests that
|
|
19
|
+
* reach the mutant got to it (`readIsolatedUnit`): it runs once more with the
|
|
20
|
+
* limits it had, and a second inconclusive unit of the mutant in the test file
|
|
21
|
+
* gives its `Error` and a `tests-stopped-early` warning. The verdict of a
|
|
22
|
+
* mutant follows `decideEvidence`: the kill or timeout of its first test file
|
|
23
|
+
* in the order of `routeIsolated` that has one, once every file before it is
|
|
24
|
+
* done; a timeout waiting for its confirmation, a crash waiting for one more
|
|
25
|
+
* run or a unit waiting for its retry holds back the evidence of later files,
|
|
26
|
+
* so the verdict does not depend on which files ran together. Kills, reached
|
|
27
|
+
* passes and final timeouts go to the cache of the run, which keeps only what
|
|
28
|
+
* it may reuse; a timeout or a crash that waits for another run does not, and
|
|
29
|
+
* the cache never keeps an `Error`. The cost of a unit counts the start of its
|
|
30
|
+
* process too.
|
|
23
31
|
*
|
|
24
32
|
* @param state - State of the run, updated in place.
|
|
25
33
|
* @param planned - The plan the run executed and the requests it was built
|
|
@@ -3,33 +3,41 @@ import { getUnitEvidence as t } from "./get-unit-evidence.js";
|
|
|
3
3
|
import { getDisplayPath as n } from "./get-display-path.js";
|
|
4
4
|
import { decideEvidence as r } from "./decide-evidence.js";
|
|
5
5
|
function i(n, r, i) {
|
|
6
|
-
let { requests:
|
|
7
|
-
for (let [r, i] of
|
|
8
|
-
let
|
|
9
|
-
if (
|
|
10
|
-
|
|
6
|
+
let { requests: c, plan: l } = r, u = new Map(i.units.map((e) => [e.unit, e])), d = [], f = [], p = /* @__PURE__ */ new Set();
|
|
7
|
+
for (let [r, i] of l.units.entries()) {
|
|
8
|
+
let s = c[r], l = n.mutants.get(i.mutant), m = u.get(r);
|
|
9
|
+
if (m === void 0) {
|
|
10
|
+
f.push(s);
|
|
11
11
|
continue;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
let
|
|
15
|
-
facts:
|
|
16
|
-
request:
|
|
13
|
+
l.units += 1, l.tries += 1, l.duration += m.duration, l.unitDuration += m.duration + (m.startup ?? 0), m.incomplete === "hang" && o(n, i), p.add(l);
|
|
14
|
+
let h = e(n, l, {
|
|
15
|
+
facts: m,
|
|
16
|
+
request: s,
|
|
17
17
|
unit: i
|
|
18
|
+
}), g = t(h, s);
|
|
19
|
+
if (h !== null && g !== "confirming" && n.cache?.recordUnit(l, s.file, {
|
|
20
|
+
inputs: m.inputs,
|
|
21
|
+
verdict: h
|
|
22
|
+
}), l.survived ||= h === "survived", l.evidence.set(s.file, g), typeof h == "object" && h?.status === "Error") typeof g == "object" ? a(n, i, g.message) : d.push({
|
|
23
|
+
...s,
|
|
24
|
+
inconclusive: !0
|
|
18
25
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
else if (g === "confirming") {
|
|
27
|
+
let e = typeof h == "object" && h?.cause;
|
|
28
|
+
d.push(e === "crash" ? {
|
|
29
|
+
...s,
|
|
30
|
+
crashed: !0
|
|
31
|
+
} : {
|
|
32
|
+
...s,
|
|
33
|
+
raised: e === "hit-limit",
|
|
34
|
+
confirming: !0,
|
|
35
|
+
retried: !1
|
|
36
|
+
});
|
|
37
|
+
}
|
|
30
38
|
}
|
|
31
|
-
for (let e of
|
|
32
|
-
for (let e of
|
|
39
|
+
for (let e of p) s(e);
|
|
40
|
+
for (let e of f) {
|
|
33
41
|
let t = n.mutants.get(e.mutant);
|
|
34
42
|
t.verdict === null && (e.retried ? (t.evidence.set(e.file, {
|
|
35
43
|
message: "The test runner did not report this mutant.",
|
|
@@ -37,14 +45,25 @@ function i(n, r, i) {
|
|
|
37
45
|
cause: null,
|
|
38
46
|
file: null,
|
|
39
47
|
test: null
|
|
40
|
-
}),
|
|
48
|
+
}), s(t)) : (!e.confirming && !e.crashed && t.evidence.set(e.file, "retrying"), d.push({
|
|
41
49
|
...e,
|
|
42
50
|
retried: !0
|
|
43
51
|
})));
|
|
44
52
|
}
|
|
45
|
-
return
|
|
53
|
+
return d;
|
|
54
|
+
}
|
|
55
|
+
function a(e, t, r) {
|
|
56
|
+
let i = n(t.file, e.root);
|
|
57
|
+
e.diagnostics.push({
|
|
58
|
+
message: `The test file ${i} gave mutant ${t.mutant} no verdict in two runs. ${r}`,
|
|
59
|
+
code: "tests-stopped-early",
|
|
60
|
+
severity: "warning",
|
|
61
|
+
file: i,
|
|
62
|
+
column: null,
|
|
63
|
+
line: null
|
|
64
|
+
});
|
|
46
65
|
}
|
|
47
|
-
function
|
|
66
|
+
function o(e, t) {
|
|
48
67
|
let r = n(t.file, e.root);
|
|
49
68
|
e.diagnostics.push({
|
|
50
69
|
message: `The test file ${r} ran past its time budget with mutant ${t.mutant} and was stopped.`,
|
|
@@ -55,7 +74,7 @@ function a(e, t) {
|
|
|
55
74
|
line: null
|
|
56
75
|
});
|
|
57
76
|
}
|
|
58
|
-
function
|
|
77
|
+
function s(e) {
|
|
59
78
|
let t = r(e);
|
|
60
79
|
t !== null && (e.verdict = t.verdict);
|
|
61
80
|
}
|
|
@@ -18,7 +18,8 @@ import { RunKind } from '../../types/run/run-kind.js';
|
|
|
18
18
|
* @param work.confirming - Of the mutants of an isolated round, those that
|
|
19
19
|
* confirm a timeout; 0 when omitted.
|
|
20
20
|
* @param work.retrying - Of the mutants of an isolated round, those that run
|
|
21
|
-
* again after a lost result; 0 when
|
|
21
|
+
* again after a lost result, an inconclusive unit or a crash; 0 when
|
|
22
|
+
* omitted.
|
|
22
23
|
*/
|
|
23
24
|
export declare function countRun(state: RunState, kind: Exclude<RunKind, 'dry'>, work: {
|
|
24
25
|
confirming?: number;
|
|
@@ -25,6 +25,11 @@ interface RunStateInput {
|
|
|
25
25
|
* or not.
|
|
26
26
|
*/
|
|
27
27
|
hosted: readonly Mutant[];
|
|
28
|
+
/**
|
|
29
|
+
* Whether isolated units of one test file may run at the same time; false
|
|
30
|
+
* when omitted.
|
|
31
|
+
*/
|
|
32
|
+
parallelUnits?: boolean;
|
|
28
33
|
/**
|
|
29
34
|
* Coverage and stability of the dry run.
|
|
30
35
|
*/
|
|
@@ -13,7 +13,10 @@ interface WorkDirectory {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Creates a fresh directory for the files of one run (plans, results,
|
|
16
|
-
* heartbeats) in the system temporary directory.
|
|
16
|
+
* heartbeats) in the system temporary directory. Until it is removed, it is
|
|
17
|
+
* among the live work directories (`LIVE_WORK_DIRECTORIES`), which an
|
|
18
|
+
* interrupted run whose cleanup takes too long removes before the process ends
|
|
19
|
+
* (`removeLiveWorkDirectories`).
|
|
17
20
|
*
|
|
18
21
|
* @returns Path of the directory and a function that deletes it.
|
|
19
22
|
*/
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { LIVE_WORK_DIRECTORIES as e } from "./live-work-directories.js";
|
|
2
|
+
import t from "node:path";
|
|
3
|
+
import { tmpdir as n } from "node:os";
|
|
4
|
+
import { mkdtemp as r, rm as i } from "node:fs/promises";
|
|
5
|
+
async function a() {
|
|
6
|
+
let a = await r(t.join(n(), "mootant-"));
|
|
7
|
+
return e.add(a), {
|
|
8
|
+
remove: async () => {
|
|
9
|
+
await i(a, {
|
|
10
|
+
recursive: !0,
|
|
11
|
+
force: !0
|
|
12
|
+
}), e.delete(a);
|
|
13
|
+
},
|
|
14
|
+
path: a
|
|
12
15
|
};
|
|
13
16
|
}
|
|
14
|
-
export {
|
|
17
|
+
export { a as createWorkDirectory };
|
|
@@ -6,9 +6,10 @@ import { MutantVerdict, MutantState } from '../../types/run/mutant-state.js';
|
|
|
6
6
|
* every file before it is done without one. A file is not done while it waits
|
|
7
7
|
* to run (it has no evidence), for a timeout confirmation or for a retry, so
|
|
8
8
|
* the verdict depends neither on which files ran together nor on which came
|
|
9
|
-
* from the cache. A file the test runner did not report
|
|
10
|
-
* when no file has a kill or a timeout. Without
|
|
11
|
-
* all its files are done, with no verdict: a
|
|
9
|
+
* from the cache. A file the test runner did not report, or one inconclusive
|
|
10
|
+
* twice, gives its `Error` only when no file has a kill or a timeout. Without
|
|
11
|
+
* any, the mutant is decided once all its files are done, with no verdict: a
|
|
12
|
+
* reached pass makes it `Survived`.
|
|
12
13
|
*
|
|
13
14
|
* @param mutant - Test files of the mutant in order and their evidence.
|
|
14
15
|
* @returns The verdict, or null while it is undecided.
|
|
@@ -2,13 +2,19 @@ import { IsolatedEvidence } from '../../types/run/isolated-evidence.js';
|
|
|
2
2
|
import { MutantVerdict } from '../../types/run/mutant-state.js';
|
|
3
3
|
import { IsolatedRequest } from '../../types/run/run-state.js';
|
|
4
4
|
/**
|
|
5
|
-
* Turns the outcome of an isolated unit into the evidence of its test file:
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
5
|
+
* Turns the outcome of an isolated unit into the evidence of its test file: an
|
|
6
|
+
* inconclusive unit waits for one more run, as a lost one does, and keeps a
|
|
7
|
+
* timeout or a crash it reran waiting, unless an earlier unit of the mutant in
|
|
8
|
+
* the test file was inconclusive too, which gives its `Error`; a crash waits
|
|
9
|
+
* for one more run of the unit, as something else, such as the OOM killer or a
|
|
10
|
+
* `kill -9`, can end its process too, unless an earlier unit of the mutant in
|
|
11
|
+
* the test file crashed, while a lost result confirms nothing; a timeout waits
|
|
12
|
+
* for its confirmation, unless the unit confirmed one with what stopped it: a
|
|
13
|
+
* timer or a hang in any confirming unit, the hit limit only in one with the
|
|
14
|
+
* raised limit, since a mutant that only makes code hotter goes over the hit
|
|
15
|
+
* limit too, also when the doubled time of a timer's confirmation lets it reach
|
|
16
|
+
* its hot code; a reached pass and a unit that decided nothing are done without
|
|
17
|
+
* a verdict, and any other verdict stands.
|
|
12
18
|
*
|
|
13
19
|
* @param verdict - Outcome of the unit (`readIsolatedUnit`).
|
|
14
20
|
* @param request - Mutant and test file of the unit.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
function e(e, t) {
|
|
2
|
-
return e === "survived" || e === null ? "none" : !(e.cause === "hit-limit" ? t.raised : t.confirming) && e.status === "Timeout" ? "confirming" : e;
|
|
2
|
+
return e === "survived" || e === null ? "none" : e.status === "Error" && t.inconclusive !== !0 ? t.confirming || t.crashed ? "confirming" : "retrying" : e.cause === "crash" ? t.crashed ? e : "confirming" : !(e.cause === "hit-limit" ? t.raised : t.confirming) && e.status === "Timeout" ? "confirming" : e;
|
|
3
3
|
}
|
|
4
4
|
export { e as getUnitEvidence };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AdapterSession } from '../../types/adapter/adapter-session.js';
|
|
2
|
+
/**
|
|
3
|
+
* Wraps the session of a run so that an interrupted run asks nothing more of
|
|
4
|
+
* the test runner: once the signal aborted, a call throws the signal's reason
|
|
5
|
+
* without starting, and a call that was running throws it when it ends,
|
|
6
|
+
* dropping what it gave, so verdicts of units the interrupt stopped never
|
|
7
|
+
* count. A running call is awaited, not cut short: the adapter ends it
|
|
8
|
+
* (`AdapterContext.signal`), so `close` never runs alongside it and no
|
|
9
|
+
* rejection is left unhandled. `close` passes through. The facts of the session
|
|
10
|
+
* (`diagnostics`, `version`, `workers`) and whether it has `cacheInputs` are
|
|
11
|
+
* read from the session itself each time, so a session that keeps them in
|
|
12
|
+
* getters of its class or changes them later reads the same through the guard.
|
|
13
|
+
*
|
|
14
|
+
* @param session - Session the adapter started.
|
|
15
|
+
* @param signal - Signal that interrupts the run.
|
|
16
|
+
* @returns The guarded session.
|
|
17
|
+
*/
|
|
18
|
+
export declare function guardSession(session: AdapterSession, signal: AbortSignal): AdapterSession;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function e(e, t) {
|
|
2
|
+
async function n(e) {
|
|
3
|
+
t.throwIfAborted();
|
|
4
|
+
try {
|
|
5
|
+
return await e();
|
|
6
|
+
} finally {
|
|
7
|
+
t.throwIfAborted();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
get cacheInputs() {
|
|
12
|
+
return e.cacheInputs === void 0 ? void 0 : () => n(() => e.cacheInputs());
|
|
13
|
+
},
|
|
14
|
+
get diagnostics() {
|
|
15
|
+
return e.diagnostics;
|
|
16
|
+
},
|
|
17
|
+
get version() {
|
|
18
|
+
return e.version;
|
|
19
|
+
},
|
|
20
|
+
get workers() {
|
|
21
|
+
return e.workers;
|
|
22
|
+
},
|
|
23
|
+
runIsolated: (t) => n(() => e.runIsolated(t)),
|
|
24
|
+
listTestFiles: () => n(() => e.listTestFiles()),
|
|
25
|
+
dryRun: (t) => n(() => e.dryRun(t)),
|
|
26
|
+
runBatch: (t) => n(() => e.runBatch(t)),
|
|
27
|
+
close: () => e.close()
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export { e as guardSession };
|
|
@@ -11,7 +11,9 @@ import { IsolatedUnit } from '../../types/adapter/isolated-plan.js';
|
|
|
11
11
|
* of the overrun, and one after it throws at its first site, as the count of
|
|
12
12
|
* the unit stays over the limit. With no failed test, the limit stopped the
|
|
13
13
|
* load or a hook, whose error is the message. A hang names no test, as no
|
|
14
|
-
* adapter reports the try that hung.
|
|
14
|
+
* adapter reports the try that hung. A unit without a kill or a timeout is
|
|
15
|
+
* inconclusive when something else stopped the tests that reach the mutant
|
|
16
|
+
* before they got to it (`readUndecidedUnit`).
|
|
15
17
|
*
|
|
16
18
|
* @param state - State of the run.
|
|
17
19
|
* @param mutant - State of the unit's mutant.
|
|
@@ -19,8 +21,9 @@ import { IsolatedUnit } from '../../types/adapter/isolated-plan.js';
|
|
|
19
21
|
* @param ran.request - Mutant and test file key of the unit.
|
|
20
22
|
* @param ran.unit - Unit of the plan.
|
|
21
23
|
* @param ran.facts - Facts the adapter reported for it.
|
|
22
|
-
* @returns Kill or timeout evidence, `
|
|
23
|
-
* when the unit decided
|
|
24
|
+
* @returns Kill or timeout evidence, an `Error` verdict for an inconclusive
|
|
25
|
+
* unit, `survived` for a reached pass, or null when the unit decided
|
|
26
|
+
* nothing.
|
|
24
27
|
*/
|
|
25
28
|
export declare function readIsolatedUnit(state: RunState, mutant: MutantState, ran: {
|
|
26
29
|
request: IsolatedRequest;
|