{"action":"created","issue":{"url":"https://api.github.com/repos/sinonjs/lolex/issues/20","labels_url":"https://api.github.com/repos/sinonjs/lolex/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/sinonjs/lolex/issues/20/comments","events_url":"https://api.github.com/repos/sinonjs/lolex/issues/20/events","html_url":"https://github.com/sinonjs/lolex/pull/20","id":101726211,"number":20,"title":"Fix for Sinon.JS issue #766: clearTimeout() no longer clears Immediat…","user":{"login":"rogierschouten","id":7348032,"avatar_url":"https://avatars.githubusercontent.com/u/7348032?v=3","gravatar_id":"","url":"https://api.github.com/users/rogierschouten","html_url":"https://github.com/rogierschouten","followers_url":"https://api.github.com/users/rogierschouten/followers","following_url":"https://api.github.com/users/rogierschouten/following{/other_user}","gists_url":"https://api.github.com/users/rogierschouten/gists{/gist_id}","starred_url":"https://api.github.com/users/rogierschouten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogierschouten/subscriptions","organizations_url":"https://api.github.com/users/rogierschouten/orgs","repos_url":"https://api.github.com/users/rogierschouten/repos","events_url":"https://api.github.com/users/rogierschouten/events{/privacy}","received_events_url":"https://api.github.com/users/rogierschouten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-18T18:56:59Z","updated_at":"2015-08-19T08:45:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sinonjs/lolex/pulls/20","html_url":"https://github.com/sinonjs/lolex/pull/20","diff_url":"https://github.com/sinonjs/lolex/pull/20.diff","patch_url":"https://github.com/sinonjs/lolex/pull/20.patch"},"body":"…e/Interval and vice versa\r\n\r\nA clearTimeout(), given the ID of a timer started with setImmediate() or\r\nsetInterval() would erroneously clear that immediate or interval"},"comment":{"url":"https://api.github.com/repos/sinonjs/lolex/issues/comments/132495808","html_url":"https://github.com/sinonjs/lolex/pull/20#issuecomment-132495808","issue_url":"https://api.github.com/repos/sinonjs/lolex/issues/20","id":132495808,"user":{"login":"rogierschouten","id":7348032,"avatar_url":"https://avatars.githubusercontent.com/u/7348032?v=3","gravatar_id":"","url":"https://api.github.com/users/rogierschouten","html_url":"https://github.com/rogierschouten","followers_url":"https://api.github.com/users/rogierschouten/followers","following_url":"https://api.github.com/users/rogierschouten/following{/other_user}","gists_url":"https://api.github.com/users/rogierschouten/gists{/gist_id}","starred_url":"https://api.github.com/users/rogierschouten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogierschouten/subscriptions","organizations_url":"https://api.github.com/users/rogierschouten/orgs","repos_url":"https://api.github.com/users/rogierschouten/repos","events_url":"https://api.github.com/users/rogierschouten/events{/privacy}","received_events_url":"https://api.github.com/users/rogierschouten/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T08:45:34Z","updated_at":"2015-08-19T08:45:34Z","body":"That is true, but in this case you don't want to mimick reality (I had this discussion on the sinon issue as well). It is bad programming practice to have setTimeout() followed by clearImmediate() -  and on some platforms, as you saw, it will not do what you intended. Therefore it would be handy if Sinon was strict so you can find your bug in unittests instead of discovering it on one of the platforms"}}