{"action":"opened","issue":{"url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/758","labels_url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/758/labels{/name}","comments_url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/758/comments","events_url":"https://api.github.com/repos/cjohansen/Sinon.JS/issues/758/events","html_url":"https://github.com/cjohansen/Sinon.JS/issues/758","id":85497316,"number":758,"title":"Sinon breaks on import","user":{"login":"domderen","id":2360738,"avatar_url":"https://avatars.githubusercontent.com/u/2360738?v=3","gravatar_id":"","url":"https://api.github.com/users/domderen","html_url":"https://github.com/domderen","followers_url":"https://api.github.com/users/domderen/followers","following_url":"https://api.github.com/users/domderen/following{/other_user}","gists_url":"https://api.github.com/users/domderen/gists{/gist_id}","starred_url":"https://api.github.com/users/domderen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domderen/subscriptions","organizations_url":"https://api.github.com/users/domderen/orgs","repos_url":"https://api.github.com/users/domderen/repos","events_url":"https://api.github.com/users/domderen/events{/privacy}","received_events_url":"https://api.github.com/users/domderen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-05T10:05:36Z","updated_at":"2015-06-05T10:05:36Z","closed_at":null,"body":"Hi,\r\n\r\nI have a project that uses sinon in unit tests. The project worked just fine could of days ago, and during that time I didn't change anything in it. Today I cloned it on a different machine, and tried running the tests again, but they now break with stack trace:\r\n\r\n```\r\n/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/util/fake_xdomain_request.js:13\r\n    undefined.sinon = {};\r\n                    ^\r\nTypeError: Cannot set property 'sinon' of undefined\r\n    at Object.<anonymous> (/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/util/fake_xdomain_request.js:13:15)\r\n    at Module._compile (module.js:431:26)\r\n    at normalLoader (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:160:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:173:7)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Module.require (module.js:366:17)\r\n    at require (module.js:385:17)\r\n    at loadDependencies (/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/util/fake_server.js:228:9)\r\n    at /Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/util/fake_server.js:238:9\r\n    at Object.<anonymous> (/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/util/fake_server.js:242:2)\r\n    at Module._compile (module.js:431:26)\r\n    at normalLoader (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:160:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:173:7)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Module.require (module.js:366:17)\r\n    at require (module.js:385:17)\r\n    at loadDependencies (/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/util/fake_server_with_clock.js:89:9)\r\n    at /Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/util/fake_server_with_clock.js:97:9\r\n    at Object.<anonymous> (/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/util/fake_server_with_clock.js:101:2)\r\n    at Module._compile (module.js:431:26)\r\n    at normalLoader (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:160:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:173:7)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Module.require (module.js:366:17)\r\n    at require (module.js:385:17)\r\n    at loadDependencies (/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/sandbox.js:147:9)\r\n    at /Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/sandbox.js:156:9\r\n    at Object.<anonymous> (/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon/sandbox.js:162:2)\r\n    at Module._compile (module.js:431:26)\r\n    at normalLoader (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:160:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:173:7)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Module.require (module.js:366:17)\r\n    at require (module.js:385:17)\r\n    at loadDependencies (/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon.js:28:9)\r\n    at /Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon.js:39:9\r\n    at Object.<anonymous> (/Users/dominik/dev/testing-presentation/node_modules/sinon/lib/sinon.js:46:2)\r\n    at Module._compile (module.js:431:26)\r\n    at normalLoader (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:160:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:173:7)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Module.require (module.js:366:17)\r\n    at require (module.js:385:17)\r\n    at Object.<anonymous> (/Users/dominik/dev/testing-presentation/test/unit/ValidationUtil-test.js:2:46)\r\n    at Module._compile (module.js:431:26)\r\n    at normalLoader (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:160:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/dominik/dev/testing-presentation/node_modules/babel/node_modules/babel-core/lib/babel/api/register/node.js:173:7)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Module.require (module.js:366:17)\r\n    at require (module.js:385:17)\r\n    at /Users/dominik/dev/testing-presentation/node_modules/mocha/lib/mocha.js:192:27\r\n    at Array.forEach (native)\r\n    at Mocha.loadFiles (/Users/dominik/dev/testing-presentation/node_modules/mocha/lib/mocha.js:189:14)\r\n    at Mocha.run (/Users/dominik/dev/testing-presentation/node_modules/mocha/lib/mocha.js:422:31)\r\n    at Object.<anonymous> (/Users/dominik/dev/testing-presentation/node_modules/mocha/bin/_mocha:398:16)\r\n    at Module._compile (module.js:431:26)\r\n    at Object.Module._extensions..js (module.js:449:10)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Function.Module.runMain (module.js:472:10)\r\n    at startup (node.js:124:18)\r\n    at node.js:959:3\r\n```\r\n\r\nThe project I speak about is available at: https://github.com/domderen/testing-presentation\r\n\r\nIt looks to me like some sinon dependency got updated and it now breaks sinon during requireing. I'd appreciate any help on this one."}}