While it should be bundled with jsdom, it isn’t with jsdom 16. Therefore you can polyfill like so:
import { TextEncoder, TextDecoder } from 'util';
Object.assign(global, { TextDecoder, TextEncoder });
You will have to add that to the test or to a setupFile like setup.jest.ts
.