{"action":"opened","issue":{"url":"https://api.github.com/repos/jashkenas/coffeescript/issues/4103","labels_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/4103/labels{/name}","comments_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/4103/comments","events_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/4103/events","html_url":"https://github.com/jashkenas/coffeescript/issues/4103","id":107228850,"number":4103,"title":"Problem running tests in mocha when upgrading to coffee 1.10","user":{"login":"dmoisset","id":200733,"avatar_url":"https://avatars.githubusercontent.com/u/200733?v=3","gravatar_id":"","url":"https://api.github.com/users/dmoisset","html_url":"https://github.com/dmoisset","followers_url":"https://api.github.com/users/dmoisset/followers","following_url":"https://api.github.com/users/dmoisset/following{/other_user}","gists_url":"https://api.github.com/users/dmoisset/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoisset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoisset/subscriptions","organizations_url":"https://api.github.com/users/dmoisset/orgs","repos_url":"https://api.github.com/users/dmoisset/repos","events_url":"https://api.github.com/users/dmoisset/events{/privacy}","received_events_url":"https://api.github.com/users/dmoisset/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-18T15:54:35Z","updated_at":"2015-09-18T15:54:35Z","closed_at":null,"body":"I have a test suite that started failing when I upgraded from coffee-script from 1.8.0 to 1.10.0. After reducing it to a minimal version, I got to this:\r\n\r\n```coffeescript\r\nassert = require \"assert\"\r\nsinon = require 'sinon'\r\n\r\nsuite 'break it', ->\r\n    setup ->\r\n        sinon.stub(Object, 'create')\r\n    teardown -> null\r\n    test \"foo\", -> assert.equal(1+1, 2)\r\n```\r\n\r\nI'm running this command: `mocha --ui tdd --compilers coffee:coffee-script/register test_broken.coffee` (`test_broken.coffee` is the file above). This is with mocha@2.0.1, sinon@1.11.1. \r\n\r\nThe issue might be somehow related to the compiler registration code; If I compile the file manually with `coffee -c test_broken.coffee` and then run `mocha --ui tdd --compilers coffee:coffee-script/register test_broken.js` (i.e., I give mocha the precompiled file), the test runs and passes ok. \r\n\r\nActually, I've tested other versions and the first one with problems is 1.9.0, 1.8.0 is the last one working ok"}}