An extension of jest-environment-jsdom with support for the Encoding API.
Note that jest-environment-jsdom
is still required as a peer dependency:
npm install --save-dev jest-environment-jsdom @bufbuild/jest-environment-jsdom
Update the testEnvironment
property of your Jest config like so:
import type { Config } from 'jest';
const config: Config = {
- testEnvironment: 'jsdom',
+ testEnvironment: '@bufbuild/jest-environment-jsdom',
...
};
Full documentation can be found in the package README.
- @bufbuild/jest-environment-jsdom: Jest test environment with support for the Encoding API.
This project is in beta, which means we may make a few changes as we gather feedback from early adopters. Join us on Slack to stay updated on future releases.
Offered under the Apache 2 license.