{"action":"created","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/3087","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/3087/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/3087/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/3087/events","html_url":"https://github.com/ampproject/amphtml/pull/3087","id":152917462,"number":3087,"title":"Fix missing sinon imports.","user":{"login":"mkhatib","id":2647,"avatar_url":"https://avatars.githubusercontent.com/u/2647?v=3","gravatar_id":"","url":"https://api.github.com/users/mkhatib","html_url":"https://github.com/mkhatib","followers_url":"https://api.github.com/users/mkhatib/followers","following_url":"https://api.github.com/users/mkhatib/following{/other_user}","gists_url":"https://api.github.com/users/mkhatib/gists{/gist_id}","starred_url":"https://api.github.com/users/mkhatib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkhatib/subscriptions","organizations_url":"https://api.github.com/users/mkhatib/orgs","repos_url":"https://api.github.com/users/mkhatib/repos","events_url":"https://api.github.com/users/mkhatib/events{/privacy}","received_events_url":"https://api.github.com/users/mkhatib/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ampproject/amphtml/labels/NEEDS%20REVIEW","name":"NEEDS REVIEW","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-05-04T02:33:34Z","updated_at":"2016-05-04T22:15:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/3087","html_url":"https://github.com/ampproject/amphtml/pull/3087","diff_url":"https://github.com/ampproject/amphtml/pull/3087.diff","patch_url":"https://github.com/ampproject/amphtml/pull/3087.patch"},"body":"Missing imports caused tests to fail sometimes, I've observed failures in `test-3p-frame` because of the missing `sinon` imports where it would fail with an ambiguous error of `.apply on undefined`. \r\n\r\n```log\r\nChrome 50.0.2661 (Mac OS X 10.11.4) 3p-frame \"before each\" hook for \"add attributes\" FAILED\r\n\tTypeError: Cannot read property 'apply' of undefined\r\n\t    at Object.useFakeTimers (/Users/mkhatib/amphtml/node_modules/karma-sinon-chai/node_modules/sinon/lib/sinon/sandbox.js:60:49)\r\n\t    at Context.<anonymous> (/var/folders/7w/bvjck7ls7f58m040x_qvph4w002y5_/T/04cec7eade73edf4e00348343b3bb3f1.browserify:60490:21 <- /Users/mkhatib/amphtml/test/functional/test-3p-frame.js:40:20)\r\n```\r\n\r\nAfter investigating that error was happening inside sinon sandbox library file where it tries to apply `useFakeTimer` method. Adding the proper import in the test file fixed this issue."},"comment":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/comments/217020119","html_url":"https://github.com/ampproject/amphtml/pull/3087#issuecomment-217020119","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/3087","id":217020119,"user":{"login":"mkhatib","id":2647,"avatar_url":"https://avatars.githubusercontent.com/u/2647?v=3","gravatar_id":"","url":"https://api.github.com/users/mkhatib","html_url":"https://github.com/mkhatib","followers_url":"https://api.github.com/users/mkhatib/followers","following_url":"https://api.github.com/users/mkhatib/following{/other_user}","gists_url":"https://api.github.com/users/mkhatib/gists{/gist_id}","starred_url":"https://api.github.com/users/mkhatib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkhatib/subscriptions","organizations_url":"https://api.github.com/users/mkhatib/orgs","repos_url":"https://api.github.com/users/mkhatib/repos","events_url":"https://api.github.com/users/mkhatib/events{/privacy}","received_events_url":"https://api.github.com/users/mkhatib/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T22:15:13Z","updated_at":"2016-05-04T22:15:13Z","body":"I am seeing a lint error:\r\n```\r\n  188:1  error  Parsing error: Deleting local variable in strict mode\r\n```\r\n\r\nIs doing `delete window.sinon` ok? Or should I /*Ok*/ this statement?"}}