Test react components, having difficulty with `document global not in Deno` using happy-dom
I've done:
import { Window } from 'happy-dom';const window = new Window();const document = window.document;globalThis.document = document;
import { Window } from 'happy-dom';const window = new Window();const document = window.document;globalThis.document = document;
and still get the error when running deno test --allow-a-bunch-of-stuffdeno test --allow-a-bunch-of-stuff document global is not available in Deno. Any idea what I'm missing? Cheers y'all.
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
D
Deno
Chat about Deno, a modern runtime for JavaScript and TypeScript.