1 2 3 4 5 6 7 8 9 10 11 12 | 1x 1x 1x 1x 1x | /** * This is used to set up the environment that's needed for most * of the unit tests for the project which includes babel transpilation * with babel-register, polyfilling, and initializing the DOM with jsdom */ require('babel-register'); require('babel-polyfill'); global.document = require('jsdom').jsdom('<body></body>'); global.window = document.defaultView; global.navigator = window.navigator; |