https://github.com/bufbuild/jest-environment-jsdom
A modern jsdom test environment for Jest
https://github.com/bufbuild/jest-environment-jsdom
jest jest-environment-jsdom jsdom
Last synced: 4 months ago
JSON representation
A modern jsdom test environment for Jest
- Host: GitHub
- URL: https://github.com/bufbuild/jest-environment-jsdom
- Owner: bufbuild
- License: apache-2.0
- Created: 2023-08-10T17:15:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-02T19:05:32.000Z (5 months ago)
- Last Synced: 2025-01-02T19:37:42.649Z (5 months ago)
- Topics: jest, jest-environment-jsdom, jsdom
- Language: TypeScript
- Homepage: https://buf.build
- Size: 636 KB
- Stars: 4
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

jest-environment-jsdom
===========[](./LICENSE) [](https://github.com/bufbuild/jest-environment-jsdom/actions/workflows/ci.yaml) [](https://www.npmjs.com/package/@bufbuild/jest-environment-jsdom)
An extension of [jest-environment-jsdom](https://www.npmjs.com/package/jest-environment-jsdom)
with support for the [Encoding API](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API).## Installation
Note that `jest-environment-jsdom` is still required as a peer dependency:
```bash
npm install --save-dev jest-environment-jsdom @bufbuild/jest-environment-jsdom
```## Usage
Update the `testEnvironment` property of your Jest config like so:
```diff
import type { Config } from 'jest';const config: Config = {
- testEnvironment: 'jsdom',
+ testEnvironment: '@bufbuild/jest-environment-jsdom',
...
};
```Full documentation can be found in the package [README](packages/jest-environment-jsdom).
## Packages
- [@bufbuild/jest-environment-jsdom](https://www.npmjs.com/package/@bufbuild/jest-environment-jsdom):
Jest test environment with support for the Encoding API.## Status: Beta
This project is in beta, which means we may make a few changes as we gather feedback from early adopters.
Join us on [Slack](https://buf.build/links/slack) to stay updated on future releases.## Legal
Offered under the [Apache 2 license](./LICENSE).