node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »



Jest environment to use the latest jsdom API and features


$ npm install --save jest-environment-jsdom-latest


In index.spec.js or whatever:

 * @jest-environment jsdom-latest
test('use the latest jsdom features in this test file', () => {
  const element = document.createElement('div');


As of v10, jsdom has a new API and some cool new features. The downside is that now it requires a Node version >= 6.

As stated in the Jest documentation (here), the minimum supported Node version is v4.0.0.

This package helps you if you are running on Node >= 6 and want to use the latest JSDOM features. It will be deprecated when Jest drops Node 4 and Node 5 support.

The build script is as close as possible from the one of Facebook's Jest repo. More on Jest environments:


MIT © Damien Seguin