From 75de35da5d6affd8d3355010d1e269cd9b2082ca Mon Sep 17 00:00:00 2001 From: Floris van Golen Date: Fri, 28 Oct 2022 14:58:13 +0200 Subject: [PATCH 1/6] feat: argument --dry-run added to only run initial tests This is to provide a better option to check if the Stryker configuration is correct. Prevent rollbacks, as dry-runs take less time than a full test run. --- packages/api/schema/stryker-core.json | 5 +++++ packages/core/src/stryker-cli.ts | 4 ++++ packages/core/src/stryker.ts | 11 +++++++++++ .../core/test/unit/config/options-validator.spec.ts | 1 + packages/core/test/unit/stryker.spec.ts | 6 ++++++ 5 files changed, 27 insertions(+) diff --git a/packages/api/schema/stryker-core.json b/packages/api/schema/stryker-core.json index d028e7ec1d..893ba337d7 100644 --- a/packages/api/schema/stryker-core.json +++ b/packages/api/schema/stryker-core.json @@ -290,6 +290,11 @@ "$ref": "#/definitions/dashboardOptions", "default": {} }, + "dryRun": { + "description": "Runs only the initial test run, without running the mutators. This can be used to test for a correct setup of Stryker.", + "type":"boolean", + "default": false + }, "eventReporter": { "description": "The options for the event recorder reporter.", "$ref": "#/definitions/eventRecorderOptions", diff --git a/packages/core/src/stryker-cli.ts b/packages/core/src/stryker-cli.ts index 44e8859a09..f372749a52 100644 --- a/packages/core/src/stryker-cli.ts +++ b/packages/core/src/stryker-cli.ts @@ -92,6 +92,10 @@ export class StrykerCli { 'Configure a build command to run after mutating the code, but before mutants are tested. This is generally used to transpile your code before testing.' + " Only configure this if your test runner doesn't take care of this already and you're not using just-in-time transpiler like `babel/register` or `ts-node`." ) + .option( + '--dry-run', + 'Execute the initial test run only, without running the mutations. This can be used to test for a correctly configured test setup.' + ) .option( '--checkers ', 'A comma separated list of checkers to use, for example --checkers typescript', diff --git a/packages/core/src/stryker.ts b/packages/core/src/stryker.ts index c3caf44386..e4180eb30f 100644 --- a/packages/core/src/stryker.ts +++ b/packages/core/src/stryker.ts @@ -24,6 +24,11 @@ export class Stryker { const rootInjector = this.injectorFactory(); const loggerProvider = provideLogger(rootInjector); + if (this.cliOptions.dryRun) { + const log = loggerProvider.resolve(commonTokens.getLogger)(Stryker.name); + log.info('Note: A dry-run has been started, no mutations will be run'); + } + try { // 1. Prepare. Load Stryker configuration, load the input files and starts the logging server const prepareExecutor = loggerProvider.injectClass(PrepareExecutor); @@ -38,6 +43,12 @@ export class Stryker { const dryRunExecutor = dryRunExecutorInjector.injectClass(DryRunExecutor); const mutationRunExecutorInjector = await dryRunExecutor.execute(); + if (this.cliOptions.dryRun) { + const log = loggerProvider.resolve(commonTokens.getLogger)(Stryker.name); + log.info('The dry-run has been completed successfully. No mutations have been executed'); + return []; + } + // 4. Actual mutation testing. Will check every mutant and if valid run it in an available test runner. const mutationRunExecutor = mutationRunExecutorInjector.injectClass(MutationTestExecutor); const mutantResults = await mutationRunExecutor.execute(); diff --git a/packages/core/test/unit/config/options-validator.spec.ts b/packages/core/test/unit/config/options-validator.spec.ts index 66788f09bc..3cfb26553c 100644 --- a/packages/core/test/unit/config/options-validator.spec.ts +++ b/packages/core/test/unit/config/options-validator.spec.ts @@ -54,6 +54,7 @@ describe(OptionsValidator.name, () => { reportType: ReportType.Full, }, disableTypeChecks: '{test,src,lib}/**/*.{js,ts,jsx,tsx,html,vue}', + dryRun: false, dryRunTimeoutMinutes: 5, eventReporter: { baseDir: 'reports/mutation/events', diff --git a/packages/core/test/unit/stryker.spec.ts b/packages/core/test/unit/stryker.spec.ts index 56944563d7..5d8e6519e2 100644 --- a/packages/core/test/unit/stryker.spec.ts +++ b/packages/core/test/unit/stryker.spec.ts @@ -196,5 +196,11 @@ describe(Stryker.name, () => { await expect(sut.runMutationTest()).rejected; expect(shutdownLoggingStub).called; }); + + it('should not run mutations when dryRun has been enabled in the cli options', async () => { + cliOptions.dryRun = true; + await sut.runMutationTest(); + expect(mutationTestExecutorMock.execute).not.called; + }); }); }); From cf9c4db5704d0515f53c64c7d75914947777e45b Mon Sep 17 00:00:00 2001 From: Floris van Golen Date: Fri, 28 Oct 2022 15:48:59 +0200 Subject: [PATCH 2/6] refactor(core): move dryRun logs and logics to executors This is to remove clutter from the stryker.ts file. --- packages/core/src/process/3-dry-run-executor.ts | 6 +++++- .../core/src/process/4-mutation-test-executor.ts | 5 +++++ packages/core/src/stryker-cli.ts | 4 ++-- packages/core/src/stryker.ts | 11 ----------- .../unit/process/4-mutation-test-executor.spec.ts | 14 ++++++++++++++ packages/core/test/unit/stryker-cli.spec.ts | 1 + packages/core/test/unit/stryker.spec.ts | 6 ------ 7 files changed, 27 insertions(+), 20 deletions(-) diff --git a/packages/core/src/process/3-dry-run-executor.ts b/packages/core/src/process/3-dry-run-executor.ts index ca551be4c7..e5c50f6cdd 100644 --- a/packages/core/src/process/3-dry-run-executor.ts +++ b/packages/core/src/process/3-dry-run-executor.ts @@ -69,8 +69,8 @@ export class DryRunExecutor { public async execute(): Promise> { const testRunnerInjector = this.injector - .provideFactory(coreTokens.testRunnerFactory, createTestRunnerFactory) .provideValue(coreTokens.testRunnerConcurrencyTokens, this.concurrencyTokenProvider.testRunnerToken$) + .provideFactory(coreTokens.testRunnerFactory, createTestRunnerFactory) .provideFactory(coreTokens.testRunnerPool, createTestRunnerPool); const testRunnerPool = testRunnerInjector.resolve(coreTokens.testRunnerPool); const { result, timing } = await lastValueFrom(testRunnerPool.schedule(of(0), (testRunner) => this.executeDryRun(testRunner))); @@ -110,6 +110,10 @@ export class DryRunExecutor { } private async executeDryRun(testRunner: TestRunner): Promise { + if (this.options.dryRun) { + this.log.info('Note: A dry-run has been started, no mutations will be run.'); + } + const dryRunTimeout = this.options.dryRunTimeoutMinutes * 1000 * 60; const project = this.injector.resolve(coreTokens.project); const dryRunFiles = objectUtils.map(project.filesToMutate, (_, name) => this.sandbox.sandboxFileFor(name)); diff --git a/packages/core/src/process/4-mutation-test-executor.ts b/packages/core/src/process/4-mutation-test-executor.ts index 1dee3cae76..9fa7cce565 100644 --- a/packages/core/src/process/4-mutation-test-executor.ts +++ b/packages/core/src/process/4-mutation-test-executor.ts @@ -64,6 +64,11 @@ export class MutationTestExecutor { ) {} public async execute(): Promise { + if (this.options.dryRun) { + this.log.info('The dry-run has been completed successfully. No mutations have been executed.'); + return []; + } + const mutantTestPlans = await this.planner.makePlan(this.mutants); const { earlyResult$, runMutant$ } = this.executeEarlyResult(from(mutantTestPlans)); const { passedMutant$, checkResult$ } = this.executeCheck(runMutant$); diff --git a/packages/core/src/stryker-cli.ts b/packages/core/src/stryker-cli.ts index f372749a52..0d08b2c642 100644 --- a/packages/core/src/stryker-cli.ts +++ b/packages/core/src/stryker-cli.ts @@ -93,8 +93,8 @@ export class StrykerCli { " Only configure this if your test runner doesn't take care of this already and you're not using just-in-time transpiler like `babel/register` or `ts-node`." ) .option( - '--dry-run', - 'Execute the initial test run only, without running the mutations. This can be used to test for a correctly configured test setup.' + '--dryRun', + 'Execute the initial test run only without doing actual mutation testing. Doing a dry run can be used to test that StrykerJS can run your test setup, for example, in CI pipelines.' ) .option( '--checkers ', diff --git a/packages/core/src/stryker.ts b/packages/core/src/stryker.ts index e4180eb30f..c3caf44386 100644 --- a/packages/core/src/stryker.ts +++ b/packages/core/src/stryker.ts @@ -24,11 +24,6 @@ export class Stryker { const rootInjector = this.injectorFactory(); const loggerProvider = provideLogger(rootInjector); - if (this.cliOptions.dryRun) { - const log = loggerProvider.resolve(commonTokens.getLogger)(Stryker.name); - log.info('Note: A dry-run has been started, no mutations will be run'); - } - try { // 1. Prepare. Load Stryker configuration, load the input files and starts the logging server const prepareExecutor = loggerProvider.injectClass(PrepareExecutor); @@ -43,12 +38,6 @@ export class Stryker { const dryRunExecutor = dryRunExecutorInjector.injectClass(DryRunExecutor); const mutationRunExecutorInjector = await dryRunExecutor.execute(); - if (this.cliOptions.dryRun) { - const log = loggerProvider.resolve(commonTokens.getLogger)(Stryker.name); - log.info('The dry-run has been completed successfully. No mutations have been executed'); - return []; - } - // 4. Actual mutation testing. Will check every mutant and if valid run it in an available test runner. const mutationRunExecutor = mutationRunExecutorInjector.injectClass(MutationTestExecutor); const mutantResults = await mutationRunExecutor.execute(); diff --git a/packages/core/test/unit/process/4-mutation-test-executor.spec.ts b/packages/core/test/unit/process/4-mutation-test-executor.spec.ts index 28fab9c57c..af4781ba97 100644 --- a/packages/core/test/unit/process/4-mutation-test-executor.spec.ts +++ b/packages/core/test/unit/process/4-mutation-test-executor.spec.ts @@ -383,4 +383,18 @@ describe(MutationTestExecutor.name, () => { // Assert expect(testInjector.logger.info).calledWithExactly('Done in %s.', '2 seconds, tops!'); }); + + it('should short circuit when dryRun is enabled', async () => { + // Arrange + testInjector.options.dryRun = true; + + // Act + const actualResults = await sut.execute(); + + // Assert + expect(mutantTestPlannerMock.makePlan).not.called; + expect(testRunner.mutantRun).not.called; + expect(checker.check).not.called; + expect(actualResults).empty; + }); }); diff --git a/packages/core/test/unit/stryker-cli.spec.ts b/packages/core/test/unit/stryker-cli.spec.ts index 914eb47485..ee7de13168 100644 --- a/packages/core/test/unit/stryker-cli.spec.ts +++ b/packages/core/test/unit/stryker-cli.spec.ts @@ -36,6 +36,7 @@ describe(StrykerCli.name, () => { [['--checkers', ''], { checkers: [] }], [['--checkerNodeArgs', '--inspect=1337 --gc'], { checkerNodeArgs: ['--inspect=1337', '--gc'] }], [['--disableBail'], { disableBail: true }], + [['--dryRun'], { dryRun: true }], [['--mutate', 'foo.js,bar.js'], { mutate: ['foo.js', 'bar.js'] }], [['--reporters', 'foo,bar'], { reporters: ['foo', 'bar'] }], [['--plugins', 'foo,bar'], { plugins: ['foo', 'bar'] }], diff --git a/packages/core/test/unit/stryker.spec.ts b/packages/core/test/unit/stryker.spec.ts index 5d8e6519e2..56944563d7 100644 --- a/packages/core/test/unit/stryker.spec.ts +++ b/packages/core/test/unit/stryker.spec.ts @@ -196,11 +196,5 @@ describe(Stryker.name, () => { await expect(sut.runMutationTest()).rejected; expect(shutdownLoggingStub).called; }); - - it('should not run mutations when dryRun has been enabled in the cli options', async () => { - cliOptions.dryRun = true; - await sut.runMutationTest(); - expect(mutationTestExecutorMock.execute).not.called; - }); }); }); From 4b6afd72a80f78267a3a3d7ae6ebdb84506f5d3e Mon Sep 17 00:00:00 2001 From: Floris van Golen Date: Fri, 28 Oct 2022 16:20:20 +0200 Subject: [PATCH 3/6] docs: update configuration to include the new option dryRun --- docs/configuration.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index ab292c46c6..ab8db2a5fd 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -145,6 +145,14 @@ Config file: `"disableTypeChecks": false` Configure a pattern that matches the files of which type checking has to be disabled. This is needed because Stryker will create (typescript) type errors when inserting the mutants in your code. Stryker disables type checking by inserting `// @ts-nocheck` atop those files and removing other `// @ts-xxx` directives (so they won't interfere with `@ts-nocheck`). The default setting allows these directives to be stripped from all JavaScript and friend files in `lib`, `src` and `test` directories. You can specify a different glob expression or set it to `false` to completely disable this behavior. +### `dryRun` [`boolean`] + +Default: `false`
+Command line: `--dryRun`
+Config file: `"dryRun": 5` + +Execute the initial test run only without doing actual mutation testing. Doing a dry run can be used to test that StrykerJS can run your test setup, for example, in CI pipelines. + ### `dryRunTimeoutMinutes` [`number`] Default: `5`
From 236c7016fee38d43d32d13a5abded5a53cf45c7e Mon Sep 17 00:00:00 2001 From: Floris van Golen Date: Fri, 28 Oct 2022 19:10:34 +0200 Subject: [PATCH 4/6] refactor(core): change dryRun to dryRunOnly The dryRunOnly name better indicates that normally dryRun is normally always run. --- docs/configuration.md | 6 +++--- packages/api/schema/stryker-core.json | 2 +- packages/core/src/process/3-dry-run-executor.ts | 4 ++-- packages/core/src/process/4-mutation-test-executor.ts | 2 +- packages/core/src/stryker-cli.ts | 4 ++-- packages/core/test/unit/config/options-validator.spec.ts | 2 +- .../core/test/unit/process/4-mutation-test-executor.spec.ts | 4 ++-- packages/core/test/unit/stryker-cli.spec.ts | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index ab8db2a5fd..2a60cd1664 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -145,11 +145,11 @@ Config file: `"disableTypeChecks": false` Configure a pattern that matches the files of which type checking has to be disabled. This is needed because Stryker will create (typescript) type errors when inserting the mutants in your code. Stryker disables type checking by inserting `// @ts-nocheck` atop those files and removing other `// @ts-xxx` directives (so they won't interfere with `@ts-nocheck`). The default setting allows these directives to be stripped from all JavaScript and friend files in `lib`, `src` and `test` directories. You can specify a different glob expression or set it to `false` to completely disable this behavior. -### `dryRun` [`boolean`] +### `dryRunOnly` [`boolean`] Default: `false`
-Command line: `--dryRun`
-Config file: `"dryRun": 5` +Command line: `--dryRunOnly`
+Config file: `"dryRunOnly": false` Execute the initial test run only without doing actual mutation testing. Doing a dry run can be used to test that StrykerJS can run your test setup, for example, in CI pipelines. diff --git a/packages/api/schema/stryker-core.json b/packages/api/schema/stryker-core.json index 893ba337d7..a166170e04 100644 --- a/packages/api/schema/stryker-core.json +++ b/packages/api/schema/stryker-core.json @@ -290,7 +290,7 @@ "$ref": "#/definitions/dashboardOptions", "default": {} }, - "dryRun": { + "dryRunOnly": { "description": "Runs only the initial test run, without running the mutators. This can be used to test for a correct setup of Stryker.", "type":"boolean", "default": false diff --git a/packages/core/src/process/3-dry-run-executor.ts b/packages/core/src/process/3-dry-run-executor.ts index e5c50f6cdd..b85d428a3b 100644 --- a/packages/core/src/process/3-dry-run-executor.ts +++ b/packages/core/src/process/3-dry-run-executor.ts @@ -110,8 +110,8 @@ export class DryRunExecutor { } private async executeDryRun(testRunner: TestRunner): Promise { - if (this.options.dryRun) { - this.log.info('Note: A dry-run has been started, no mutations will be run.'); + if (this.options.dryRunOnly) { + this.log.info('Note: the dry-run has been started, no mutations will be run.'); } const dryRunTimeout = this.options.dryRunTimeoutMinutes * 1000 * 60; diff --git a/packages/core/src/process/4-mutation-test-executor.ts b/packages/core/src/process/4-mutation-test-executor.ts index 9fa7cce565..747abdc692 100644 --- a/packages/core/src/process/4-mutation-test-executor.ts +++ b/packages/core/src/process/4-mutation-test-executor.ts @@ -64,7 +64,7 @@ export class MutationTestExecutor { ) {} public async execute(): Promise { - if (this.options.dryRun) { + if (this.options.dryRunOnly) { this.log.info('The dry-run has been completed successfully. No mutations have been executed.'); return []; } diff --git a/packages/core/src/stryker-cli.ts b/packages/core/src/stryker-cli.ts index 0d08b2c642..1f1d3c339b 100644 --- a/packages/core/src/stryker-cli.ts +++ b/packages/core/src/stryker-cli.ts @@ -93,8 +93,8 @@ export class StrykerCli { " Only configure this if your test runner doesn't take care of this already and you're not using just-in-time transpiler like `babel/register` or `ts-node`." ) .option( - '--dryRun', - 'Execute the initial test run only without doing actual mutation testing. Doing a dry run can be used to test that StrykerJS can run your test setup, for example, in CI pipelines.' + '--dryRunOnly', + 'Execute the initial test run only, without doing actual mutation testing. Doing a dry run can be used to test that StrykerJS can run your test setup, for example, in CI pipelines.' ) .option( '--checkers ', diff --git a/packages/core/test/unit/config/options-validator.spec.ts b/packages/core/test/unit/config/options-validator.spec.ts index 3cfb26553c..12e3a79ac8 100644 --- a/packages/core/test/unit/config/options-validator.spec.ts +++ b/packages/core/test/unit/config/options-validator.spec.ts @@ -54,7 +54,7 @@ describe(OptionsValidator.name, () => { reportType: ReportType.Full, }, disableTypeChecks: '{test,src,lib}/**/*.{js,ts,jsx,tsx,html,vue}', - dryRun: false, + dryRunOnly: false, dryRunTimeoutMinutes: 5, eventReporter: { baseDir: 'reports/mutation/events', diff --git a/packages/core/test/unit/process/4-mutation-test-executor.spec.ts b/packages/core/test/unit/process/4-mutation-test-executor.spec.ts index af4781ba97..0954c115da 100644 --- a/packages/core/test/unit/process/4-mutation-test-executor.spec.ts +++ b/packages/core/test/unit/process/4-mutation-test-executor.spec.ts @@ -384,9 +384,9 @@ describe(MutationTestExecutor.name, () => { expect(testInjector.logger.info).calledWithExactly('Done in %s.', '2 seconds, tops!'); }); - it('should short circuit when dryRun is enabled', async () => { + it('should short circuit when dryRunOnly is enabled', async () => { // Arrange - testInjector.options.dryRun = true; + testInjector.options.dryRunOnly = true; // Act const actualResults = await sut.execute(); diff --git a/packages/core/test/unit/stryker-cli.spec.ts b/packages/core/test/unit/stryker-cli.spec.ts index ee7de13168..647765c016 100644 --- a/packages/core/test/unit/stryker-cli.spec.ts +++ b/packages/core/test/unit/stryker-cli.spec.ts @@ -36,7 +36,7 @@ describe(StrykerCli.name, () => { [['--checkers', ''], { checkers: [] }], [['--checkerNodeArgs', '--inspect=1337 --gc'], { checkerNodeArgs: ['--inspect=1337', '--gc'] }], [['--disableBail'], { disableBail: true }], - [['--dryRun'], { dryRun: true }], + [['--dryRunOnly'], { dryRunOnly: true }], [['--mutate', 'foo.js,bar.js'], { mutate: ['foo.js', 'bar.js'] }], [['--reporters', 'foo,bar'], { reporters: ['foo', 'bar'] }], [['--plugins', 'foo,bar'], { plugins: ['foo', 'bar'] }], From 15fb6f8d2810da50856cd8168a0490a95122eed8 Mon Sep 17 00:00:00 2001 From: Floris <43369750+florisg-infosupport@users.noreply.github.com> Date: Fri, 28 Oct 2022 20:55:22 +0200 Subject: [PATCH 5/6] docs: update description of dry run only option to better represent functionality Co-authored-by: Nico Jansen --- docs/configuration.md | 2 +- packages/api/schema/stryker-core.json | 2 +- packages/core/src/process/3-dry-run-executor.ts | 2 +- packages/core/src/stryker-cli.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 2a60cd1664..365187c870 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -151,7 +151,7 @@ Default: `false`
Command line: `--dryRunOnly`
Config file: `"dryRunOnly": false` -Execute the initial test run only without doing actual mutation testing. Doing a dry run can be used to test that StrykerJS can run your test setup, for example, in CI pipelines. +Execute the initial test run only without doing actual mutation testing. Dry run only will still mutate your code before doing the dry run without those mutants being active, thus can be used to test that StrykerJS can run your test setup. This can be useful, for example, in CI pipelines. ### `dryRunTimeoutMinutes` [`number`] diff --git a/packages/api/schema/stryker-core.json b/packages/api/schema/stryker-core.json index a166170e04..9723281657 100644 --- a/packages/api/schema/stryker-core.json +++ b/packages/api/schema/stryker-core.json @@ -291,7 +291,7 @@ "default": {} }, "dryRunOnly": { - "description": "Runs only the initial test run, without running the mutators. This can be used to test for a correct setup of Stryker.", + "description": "Execute the initial test run only without doing actual mutation testing. Dry run only will still mutate your code before doing the dry run without those mutants being active, thus can be used to test that StrykerJS can run your test setup. This can be useful, for example, in CI pipelines.", "type":"boolean", "default": false }, diff --git a/packages/core/src/process/3-dry-run-executor.ts b/packages/core/src/process/3-dry-run-executor.ts index b85d428a3b..a41cbca42c 100644 --- a/packages/core/src/process/3-dry-run-executor.ts +++ b/packages/core/src/process/3-dry-run-executor.ts @@ -111,7 +111,7 @@ export class DryRunExecutor { private async executeDryRun(testRunner: TestRunner): Promise { if (this.options.dryRunOnly) { - this.log.info('Note: the dry-run has been started, no mutations will be run.'); + this.log.info('Note: running the dry-run only. No mutations will be tested.'); } const dryRunTimeout = this.options.dryRunTimeoutMinutes * 1000 * 60; diff --git a/packages/core/src/stryker-cli.ts b/packages/core/src/stryker-cli.ts index 1f1d3c339b..f929b3f194 100644 --- a/packages/core/src/stryker-cli.ts +++ b/packages/core/src/stryker-cli.ts @@ -94,7 +94,7 @@ export class StrykerCli { ) .option( '--dryRunOnly', - 'Execute the initial test run only, without doing actual mutation testing. Doing a dry run can be used to test that StrykerJS can run your test setup, for example, in CI pipelines.' + 'Execute the initial test run only, without doing actual mutation testing. Doing a dry run only can be used to test that StrykerJS can run your test setup, for example, in CI pipelines.' ) .option( '--checkers ', From a0497755181ce2dbc5dd77da57047267bfcba2b5 Mon Sep 17 00:00:00 2001 From: Floris van Golen Date: Fri, 28 Oct 2022 21:00:05 +0200 Subject: [PATCH 6/6] test: test dryRunOnly with futureproofing This prevents the scenario from happening that the mutations are short circuited because of empty mutations. --- .../core/test/unit/process/4-mutation-test-executor.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/test/unit/process/4-mutation-test-executor.spec.ts b/packages/core/test/unit/process/4-mutation-test-executor.spec.ts index 0954c115da..85a9b73ff3 100644 --- a/packages/core/test/unit/process/4-mutation-test-executor.spec.ts +++ b/packages/core/test/unit/process/4-mutation-test-executor.spec.ts @@ -387,6 +387,10 @@ describe(MutationTestExecutor.name, () => { it('should short circuit when dryRunOnly is enabled', async () => { // Arrange testInjector.options.dryRunOnly = true; + arrangeScenario(); + const plan1 = mutantRunPlan({ id: '1' }); + const plan2 = mutantRunPlan({ id: '2' }); + mutantTestPlans.push(plan1, plan2); // Act const actualResults = await sut.execute();