# All files / src/test-utils/polyfills TextDecoder.ts

42.85% Statements 3/7
0% Branches 0/1
100% Functions 0/0
42.85% Lines 3/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    81x
    1x
    1x

     import { TextDecoder } from "node:util";

    if (typeof global.TextDecoder === "undefined") {
      // eslint-disable-next-line @typescript-eslint/ban-ts-comment
      // @ts-expect-error browser TextDecoder does not support `null` while `node:util` does
      global.TextDecoder = TextDecoder;
    }