{"action":"created","issue":{"url":"https://api.github.com/repos/domenic/mocha-traceur/issues/2","labels_url":"https://api.github.com/repos/domenic/mocha-traceur/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/domenic/mocha-traceur/issues/2/comments","events_url":"https://api.github.com/repos/domenic/mocha-traceur/issues/2/events","html_url":"https://github.com/domenic/mocha-traceur/issues/2","id":56280975,"number":2,"title":"Traceurs way of doing arrow functions interferes with mocha timeout","user":{"login":"gregglind","id":163983,"avatar_url":"https://avatars.githubusercontent.com/u/163983?v=3","gravatar_id":"","url":"https://api.github.com/users/gregglind","html_url":"https://github.com/gregglind","followers_url":"https://api.github.com/users/gregglind/followers","following_url":"https://api.github.com/users/gregglind/following{/other_user}","gists_url":"https://api.github.com/users/gregglind/gists{/gist_id}","starred_url":"https://api.github.com/users/gregglind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregglind/subscriptions","organizations_url":"https://api.github.com/users/gregglind/orgs","repos_url":"https://api.github.com/users/gregglind/repos","events_url":"https://api.github.com/users/gregglind/events{/privacy}","received_events_url":"https://api.github.com/users/gregglind/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-02T19:26:17Z","updated_at":"2015-02-02T19:31:27Z","closed_at":"2015-02-02T19:31:27Z","body":"https://github.com/google/traceur-compiler/wiki/LanguageFeatures#arrow-functions\r\n\r\nWith an arrow on the BOTH the outer and inner, this somehow breaks `this` so that `timeout` doesn't work.\r\n\r\nWho should hear about this?  Mocha, or Traceur :)\r\n```javascript\r\n// not okay, arrow on both\r\ndescribe('timeout test', () => {\r\n  it(\"should timeout\", (done) => {\r\n    this.timeout(500);\r\n    setTimeout(done,300);\r\n  });\r\n});\r\n```\r\n\r\n\r\n```javascript\r\n// okay, arrow on outer only\r\ndescribe('timeout test', () => {\r\n  it(\"should timeout\", function (done) {\r\n    this.timeout(500);\r\n    setTimeout(done,300);\r\n  });\r\n});\r\n```\r\n\r\n```javascript\r\n// okay, arrow on inner only\r\ndescribe('timeout test', function () {\r\n  it(\"should timeout\", (done) => {\r\n    this.timeout(500);\r\n    setTimeout(done,300);\r\n  });\r\n});\r\n```\r\n\r\nManifests as:\r\n\r\n```\r\nTypeError: Object #<Object> has no method 'timeout'\r\n```"},"comment":{"url":"https://api.github.com/repos/domenic/mocha-traceur/issues/comments/72521226","html_url":"https://github.com/domenic/mocha-traceur/issues/2#issuecomment-72521226","issue_url":"https://api.github.com/repos/domenic/mocha-traceur/issues/2","id":72521226,"user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T19:31:27Z","updated_at":"2015-02-02T19:31:27Z","body":"Arrow functions aren't methods, so they don't have a `this` binding. Just use `function` if you need `this`.\r\n\r\nThis isn't specific to Traceur, it's just part of the ES2015 language."}}