Skip to content

Commit

Permalink
fix: mocking is lost with threads: false
Browse files Browse the repository at this point in the history
closes #482
  • Loading branch information
sheremet-va committed Jan 8, 2022
1 parent fb45522 commit 28b97d8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/vitest/src/runtime/entry.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { promises as fs } from 'fs'
import type { BuiltinEnvironment, ResolvedConfig } from '../types'
import { vi } from '../integrations/vi'
import { setupGlobalEnv, withEnv } from './setup'
import { startTests } from './run'

Expand All @@ -17,8 +16,6 @@ export async function run(files: string[], config: ResolvedConfig): Promise<void

process.__vitest_worker__.filepath = file

vi.restoreAllMocks()

await withEnv(env as BuiltinEnvironment, config.environmentOptions || {}, async() => {
await startTests([file], config)
})
Expand Down

0 comments on commit 28b97d8

Please sign in to comment.