Skip to content

Commit

Permalink
fix: define the global vari dts in the project namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed Feb 12, 2022
1 parent 289af16 commit 6044f42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/vitest/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ declare global {
const afterAll: typeof import('vitest')['afterAll']
const beforeEach: typeof import('vitest')['beforeEach']
const afterEach: typeof import('vitest')['afterEach']
let __vitest_worker__: import('vitest').WorkerGlobalState
}
export {}
4 changes: 4 additions & 0 deletions packages/vitest/src/runtime/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@ export async function run(ctx: WorkerContext) {
const { run } = await startViteNode(ctx)
return run(ctx.files, ctx.config)
}

declare global {
let __vitest_worker__: import('vitest').WorkerGlobalState
}

0 comments on commit 6044f42

Please sign in to comment.