fix sinon
This commit is contained in:
parent
7bdf04ab9e
commit
c0021c7d40
2 changed files with 7 additions and 8 deletions
|
@ -1,14 +1,13 @@
|
|||
const jsdom = require('jsdom')
|
||||
const doc = jsdom.jsdom('<!doctype html><html><body></body></html>')
|
||||
const win = doc.defaultView
|
||||
|
||||
const { JSDOM } = jsdom
|
||||
const dom = new JSDOM('<!doctype html><html><body></body></html>')
|
||||
|
||||
global.document = dom.window.document
|
||||
global.window = dom.window
|
||||
global.document = doc
|
||||
global.window = win
|
||||
|
||||
// take all properties of the window object and also attach it to the
|
||||
// mocha global object
|
||||
propagateToGlobal(dom.window)
|
||||
propagateToGlobal(win)
|
||||
|
||||
// from mocha-jsdom https://github.com/rstacruz/mocha-jsdom/blob/master/index.js#L80
|
||||
function propagateToGlobal(window) {
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
"react-router": "4.2.0",
|
||||
"redux": "3.7.2",
|
||||
"riek": "1.1.0",
|
||||
"simplewebrtc": "3.0.1",
|
||||
"simplewebrtc": "2.2.2",
|
||||
"socket.io": "1.3.7",
|
||||
"webpack": "3.5.6"
|
||||
},
|
||||
|
@ -69,7 +69,7 @@
|
|||
"mocha": "^3.5.0",
|
||||
"mocha-webpack": "^0.7.0",
|
||||
"react-addons-test-utils": "^15.6.0",
|
||||
"sinon": "^3.2.1"
|
||||
"sinon": "2.2.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"raml2html": "6.4.1"
|
||||
|
|
Loading…
Add table
Reference in a new issue