From fa4666a44d9015e8a7dc7496bd97bb02884853af Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:33:29 +0100 Subject: [PATCH] revert pool options --- .changeset/hungry-coats-cheat.md | 5 +++++ packages/cli/src/cmds/runTests.ts | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 .changeset/hungry-coats-cheat.md diff --git a/.changeset/hungry-coats-cheat.md b/.changeset/hungry-coats-cheat.md new file mode 100644 index 00000000..b2cdd473 --- /dev/null +++ b/.changeset/hungry-coats-cheat.md @@ -0,0 +1,5 @@ +--- +"@moonwall/cli": patch +--- + +Revert default pooloptions diff --git a/packages/cli/src/cmds/runTests.ts b/packages/cli/src/cmds/runTests.ts index c9871101..e9fa6050 100644 --- a/packages/cli/src/cmds/runTests.ts +++ b/packages/cli/src/cmds/runTests.ts @@ -193,11 +193,11 @@ class VitestOptionsBuilder { this.options.fileParallelism = false; this.options.pool = "forks"; this.options.poolOptions = { - forks: { + threads: { isolate: true, - minForks: 1, - maxForks: 3, - singleFork: false, + minThreads: 1, + maxThreads: 3, + singleThread: false, }, }; @@ -207,9 +207,9 @@ class VitestOptionsBuilder { if (typeof threads === "number" && process.env.MOON_RECYCLE !== "true") { this.options.fileParallelism = true; - if (this.options.poolOptions?.forks) { - this.options.poolOptions.forks.maxForks = threads; - this.options.poolOptions.forks.singleFork = false; + if (this.options.poolOptions?.threads) { + this.options.poolOptions.threads.maxThreads = threads; + this.options.poolOptions.threads.singleThread = false; } }