Skip to content

Commit 5943418

Browse files
authored
fix(happy-dom): use the nodejs console in happy-dom v11 (#4090)
Co-authored-by: David Ortner <>
1 parent 696b79e commit 5943418

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/vitest/src/integrations/env/happy-dom.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default <Environment>({
3434
const { Window, GlobalWindow } = await importModule('happy-dom') as typeof import('happy-dom')
3535
const win = new (GlobalWindow || Window)({
3636
...happyDOM,
37+
console: (console && global.console) ? global.console : undefined,
3738
url: happyDOM.url || 'http://localhost:3000',
3839
})
3940

0 commit comments

Comments
 (0)