Top "Jsdom" questions

Implementation of the WHATWG DOM and HTML Standards (among others) for node.

Mocking `document` in jest

I'm trying to write tests for my web components projects in jest. I already use babel with es2015 preset. I'm …

jestjs jsdom babel-jest
How to prevent "Property '...' does not exist on type 'Global'" with jsdom and typescript?

I try to convert an existing project to use Typescript and I have problems doing so with my testing setup. …

typescript jsdom typescript2.0
Scrape a webpage and navigate by clicking buttons

I want to perform following actions at the server side: 1) Scrape a webpage 2) Simulate a click on that page and …

node.js web-scraping phantomjs jsdom zombie.js
error 'document' is not defined : eslint / React

I'm building a React app, with create-react-app. I got the following error when running ESLint: 8:3 error 'document' is not defined …

reactjs jestjs jsx jsdom
How to manage a 'pool' of PhantomJS instances

I'm planning a webservice for my own use internally that takes one argument, a URL, and returns html representing the …

node.js web-scraping phantomjs jsdom
mocha command giving ReferenceError: window is not defined

I am using command: mocha --compilers :./test/babel-setup.js --recursive --watch It is giving error: ReferenceError: window is not defined …

node.js mocha jsdom
How to add <canvas> support to my tests in Jest?

In my Jest unit test I am rendering a component with a ColorPicker. The ColorPicker component creates a canvas object …

reactjs html5-canvas jsdom jestjs
Unmount / destroy Component in jsdom test

Is there a way to unmount and garbage collect a React Component that was mounted using TestUtils.renderIntoDocument inside a …

javascript reactjs jsdom
Simulating click on document ReactJS/JSDom

So I am writing some tests for code that adds a click event on the document. I am using JSDom, …

javascript unit-testing reactjs jsdom
Access to DOM using node.js

i want to access to html file and get an element by id using node.js, this is my html …

javascript node.js dom cheerio jsdom