From 420d64544ae7f62f55952cd60b82315112fa5c0c Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Mon, 8 Jan 2024 11:46:52 +0100 Subject: [PATCH] chore: cleanup --- packages/vitest/src/runtime/workers/forks.ts | 2 ++ packages/vitest/src/runtime/workers/vm.ts | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vitest/src/runtime/workers/forks.ts b/packages/vitest/src/runtime/workers/forks.ts index 03c4bc88b86a5..b63b03472d8ff 100644 --- a/packages/vitest/src/runtime/workers/forks.ts +++ b/packages/vitest/src/runtime/workers/forks.ts @@ -10,6 +10,8 @@ class ForksBaseWorker implements VitestWorker { } async runTests(state: WorkerGlobalState) { + // TODO: don't rely on reassigning process.exit + // https://github.com/vitest-dev/vitest/pull/4441#discussion_r1443771486 const exit = process.exit state.ctx.config = unwrapForksConfig(state.ctx.config) diff --git a/packages/vitest/src/runtime/workers/vm.ts b/packages/vitest/src/runtime/workers/vm.ts index 093573955b00c..55303e2c66537 100644 --- a/packages/vitest/src/runtime/workers/vm.ts +++ b/packages/vitest/src/runtime/workers/vm.ts @@ -4,7 +4,6 @@ import { pathToFileURL } from 'node:url' import { resolve } from 'pathe' import type { WorkerGlobalState } from '../../types/worker' import { createCustomConsole } from '../console' -import type { VitestExecutor } from '../execute' import { getDefaultRequestStubs, startVitestExecutor } from '../execute' import { distDir } from '../../paths' import { ExternalModulesExecutor } from '../external-executor'