Is your feature request related to a problem? Please describe.
On the global scope, TextEncoder & TextDecoder are available (see MDN).
But when I run this code:
const h = require('happy-dom');
const w = new h.Window();
w.TextEncoder // undefined
This poses an issue for tests running in Jest with @happy-dom/jest-environment, testing code using TextEncoder
Describe the solution you'd like
Implement those 2 globals by exposing those from node:util
Describe alternatives you've considered
N/A
Additional context
N/A
Is your feature request related to a problem? Please describe.
On the global scope,
TextEncoder&TextDecoderare available (see MDN).But when I run this code:
This poses an issue for tests running in Jest with
@happy-dom/jest-environment, testing code usingTextEncoderDescribe the solution you'd like
Implement those 2 globals by exposing those from
node:utilDescribe alternatives you've considered
N/A
Additional context
N/A