{"action":"closed","issue":{"url":"https://api.github.com/repos/zinserjan/mocha-webpack/issues/6","repository_url":"https://api.github.com/repos/zinserjan/mocha-webpack","labels_url":"https://api.github.com/repos/zinserjan/mocha-webpack/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/zinserjan/mocha-webpack/issues/6/comments","events_url":"https://api.github.com/repos/zinserjan/mocha-webpack/issues/6/events","html_url":"https://github.com/zinserjan/mocha-webpack/issues/6","id":148794147,"number":6,"title":"Cannot integrate with jsdom","user":{"login":"batusai513","id":996671,"avatar_url":"https://avatars.githubusercontent.com/u/996671?v=3","gravatar_id":"","url":"https://api.github.com/users/batusai513","html_url":"https://github.com/batusai513","followers_url":"https://api.github.com/users/batusai513/followers","following_url":"https://api.github.com/users/batusai513/following{/other_user}","gists_url":"https://api.github.com/users/batusai513/gists{/gist_id}","starred_url":"https://api.github.com/users/batusai513/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batusai513/subscriptions","organizations_url":"https://api.github.com/users/batusai513/orgs","repos_url":"https://api.github.com/users/batusai513/repos","events_url":"https://api.github.com/users/batusai513/events{/privacy}","received_events_url":"https://api.github.com/users/batusai513/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-15T23:48:44Z","updated_at":"2016-04-25T21:34:01Z","closed_at":"2016-04-25T21:34:01Z","body":"when i try to add jsdom with the basic boilerplate in the test-setup.js file\r\n```js\r\nglobal.document = require('jsdom').jsdom('<body><div id=\"root\"></div></body>');\r\nglobal.window = document.defaultView;\r\nglobal.navigator = window.navigator;\r\n```\r\nand i run npm test it trows some errors \r\n```bash\r\nWARNING in ./~/jsdom/lib/jsdom/utils.js\r\nModule not found: Error: Cannot resolve module 'canvas' in /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom\r\nresolve module canvas in /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom\r\n  looking for modules in /Users/wardrakus/projects/react-boilerplate/client\r\n    /Users/wardrakus/projects/react-boilerplate/client/canvas doesn't exist (module as directory)\r\n    resolve 'file' canvas in /Users/wardrakus/projects/react-boilerplate/client\r\n      resolve file\r\n        /Users/wardrakus/projects/react-boilerplate/client/canvas doesn't exist\r\n        /Users/wardrakus/projects/react-boilerplate/client/canvas.js doesn't exist\r\n  looking for modules in /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/node_modules\r\n    /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/node_modules/canvas doesn't exist (module as directory)\r\n    resolve 'file' canvas in /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/node_modules\r\n      resolve file\r\n        /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/node_modules/canvas doesn't exist\r\n        /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/node_modules/canvas.js doesn't exist\r\n  looking for modules in /Users/wardrakus/projects/react-boilerplate/node_modules\r\n    /Users/wardrakus/projects/react-boilerplate/node_modules/canvas doesn't exist (module as directory)\r\n    resolve 'file' canvas in /Users/wardrakus/projects/react-boilerplate/node_modules\r\n      resolve file\r\n        /Users/wardrakus/projects/react-boilerplate/node_modules/canvas doesn't exist\r\n        /Users/wardrakus/projects/react-boilerplate/node_modules/canvas.js doesn't exist\r\n  looking for modules in /Users/wardrakus/projects/node_modules\r\n    /Users/wardrakus/projects/node_modules/canvas doesn't exist (module as directory)\r\n    resolve 'file' canvas in /Users/wardrakus/projects/node_modules\r\n      resolve file\r\n        /Users/wardrakus/projects/node_modules/canvas doesn't exist\r\n        /Users/wardrakus/projects/node_modules/canvas.js doesn't exist\r\n[/Users/wardrakus/projects/react-boilerplate/client/canvas]\r\n[/Users/wardrakus/projects/react-boilerplate/client/canvas]\r\n[/Users/wardrakus/projects/react-boilerplate/client/canvas.js]\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/node_modules/canvas]\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/node_modules/canvas]\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/node_modules/canvas.js]\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/canvas]\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/canvas]\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/canvas.js]\r\n[/Users/wardrakus/projects/node_modules/canvas]\r\n[/Users/wardrakus/projects/node_modules/canvas]\r\n[/Users/wardrakus/projects/node_modules/canvas.js]\r\n @ ./~/jsdom/lib/jsdom/utils.js 343:19-36\r\n\r\nWARNING in ./~/jsdom/lib/jsdom/living/xmlhttprequest.js\r\nCritical dependencies:\r\n19:23-30 require function is used in a way in which dependencies cannot be statically extracted\r\n @ ./~/jsdom/lib/jsdom/living/xmlhttprequest.js 19:23-30\r\nWARNING in ./~/jsdom/lib/jsdom/living/window/History.idl                                                                                                              [12/1355]\r\nModule parse failed: /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/window/History.idl The keyword 'enum' is reserved (1:0)\r\nYou may need an appropriate loader to handle this file type.\r\nSyntaxError: The keyword 'enum' is reserved (1:0)\r\n    at Parser.pp.raise (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:918:13)\r\n    at Parser.pp.parseIdent (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:669:203)\r\n    at Parser.pp.parseExprAtom (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:283:21)\r\n    at Parser.pp.parseExprSubscripts (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:225:19)\r\n    at Parser.pp.parseMaybeUnary (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:204:17)\r\n    at Parser.pp.parseExprOps (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:151:19)\r\n    at Parser.pp.parseMaybeConditional (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:133:19)\r\n    at Parser.pp.parseMaybeAssign (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:110:19)\r\n    at Parser.pp.parseExpression (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:86:19)\r\n    at Parser.pp.parseStatement (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:1750:23)\r\n    at Parser.pp.parseTopLevel (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:1645:21)\r\n    at Parser.parse (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:1613:17)\r\n    at Object.parse (/Users/wardrakus/projects/react-boilerplate/node_modules/acorn/dist/acorn.js:880:44)\r\n    at Parser.parse (/Users/wardrakus/projects/react-boilerplate/node_modules/webpack/lib/Parser.js:902:15)\r\n    at DependenciesBlock.<anonymous> (/Users/wardrakus/projects/react-boilerplate/node_modules/webpack/lib/NormalModule.js:104:16)\r\n    at DependenciesBlock.onModuleBuild (/Users/wardrakus/projects/react-boilerplate/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10)\r\n    at nextLoader (/Users/wardrakus/projects/react-boilerplate/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25)\r\n    at /Users/wardrakus/projects/react-boilerplate/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5\r\n    at Storage.finished (/Users/wardrakus/projects/react-boilerplate/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)\r\n    at /Users/wardrakus/projects/react-boilerplate/node_modules/graceful-fs/graceful-fs.js:78:16\r\n    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:404:3)\r\n @ ./~/jsdom/lib/jsdom/living ^\\.\\/.*$\r\nERROR in ./~/jsdom/lib/jsdom/living/generated/DOMPointReadOnly.js\r\nModule not found: Error: Cannot resolve 'file' or 'directory' ../nodes/DOMPointReadOnly-impl.js in /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/generated\r\nresolve file\r\n  /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/nodes/DOMPointReadOnly-impl.js doesn't exist\r\n  /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/nodes/DOMPointReadOnly-impl.js.js doesn't exist\r\nresolve directory\r\n  /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/nodes/DOMPointReadOnly-impl.js doesn't exist (directory default file)\r\n  /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/nodes/DOMPointReadOnly-impl.js/package.json doesn't exist (directory description file)\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/nodes/DOMPointReadOnly-impl.js]\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/nodes/DOMPointReadOnly-impl.js.js]\r\n @ ./~/jsdom/lib/jsdom/living/generated/DOMPointReadOnly.js 135:13-57\r\n\r\nERROR in ./~/jsdom/lib/jsdom/living/generated/ScrollIntoViewOptions.js\r\nModule not found: Error: Cannot resolve 'file' or 'directory' ./ScrollOptions in /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/generated\r\nresolve file\r\n  /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions doesn't exist\r\n  /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions.js doesn't exist\r\nresolve directory\r\n  /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions doesn't exist (directory default file)\r\n  /Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions/package.json doesn't exist (directory description file)\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions]\r\n[/Users/wardrakus/projects/react-boilerplate/node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions.js]\r\n @ ./~/jsdom/lib/jsdom/living/generated/ScrollIntoViewOptions.js 6:22-48\r\n```\r\nhow do you run tests that needs the actual DOM?, it is posible to add jsdom to this setup?\r\n\r\nthanks"}}