Quantcast
Channel: Setting up JSDOM with Mocha - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by ccprog for Setting up JSDOM with Mocha

document is a property of window, not the other way round:const dom = new JSDOM('<!DOCTYPE html><html><head></head><body></body></html>');global.window =...

View Article



Setting up JSDOM with Mocha

I'm trying to use sinon's mock and spy for testing Redux components and async actions, but as soon as I import sinon into any test file, running the following npm script:mocha --require...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images