diff --git a/projects/ngx-auth/test-setup.ts b/projects/ngx-auth/test-setup.ts index a0634c4..1d7d17a 100644 --- a/projects/ngx-auth/test-setup.ts +++ b/projects/ngx-auth/test-setup.ts @@ -1,3 +1,9 @@ +import { TextDecoder, TextEncoder } from 'node:util'; + +// @ts-expect-error https://mswjs.io/docs/migrations/1.x-to-2.x#requestresponsetextencoder-is-not-defined-jest +globalThis.TextDecoder = TextDecoder; +globalThis.TextEncoder = TextEncoder; + // @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment globalThis.ngJest = { testEnvironmentOptions: {