I am using command:
mocha --compilers :./test/babel-setup.js --recursive --watch
It is giving error:
ReferenceError: window
I was able to use jsdom-global to fix this issue. Follow the instructions in that link to install. Specifically, run
npm install --save-dev --save-exact jsdom jsdom-global
then add -r jsdom-global/register to your mocha command-line. When you re-run your tests, the window is not defined error will go away.