Skip to content

Commit

Permalink
fix: console.Console is undefined (close: #1877)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaoboy committed Aug 23, 2022
1 parent baf5e75 commit 15d94f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/vitest/src/integrations/env/node.ts
@@ -1,10 +1,13 @@
import { Console } from 'console'
import type { Environment } from '../../types'

export default <Environment>({
name: 'node',
async setup() {
async setup(global) {
global.console.Console = Console
return {
teardown() {
teardown(global) {
delete global.console.Console
},
}
},
Expand Down

0 comments on commit 15d94f2

Please sign in to comment.