{"action":"opened","number":2467,"pull_request":{"url":"https://api.github.com/repos/facebook/jest/pulls/2467","id":99689707,"html_url":"https://github.com/facebook/jest/pull/2467","diff_url":"https://github.com/facebook/jest/pull/2467.diff","patch_url":"https://github.com/facebook/jest/pull/2467.patch","issue_url":"https://api.github.com/repos/facebook/jest/issues/2467","number":2467,"state":"open","locked":false,"title":"Restore fake timers after resetting mocks","user":{"login":"thymikee","id":5106466,"avatar_url":"https://avatars.githubusercontent.com/u/5106466?v=3","gravatar_id":"","url":"https://api.github.com/users/thymikee","html_url":"https://github.com/thymikee","followers_url":"https://api.github.com/users/thymikee/followers","following_url":"https://api.github.com/users/thymikee/following{/other_user}","gists_url":"https://api.github.com/users/thymikee/gists{/gist_id}","starred_url":"https://api.github.com/users/thymikee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thymikee/subscriptions","organizations_url":"https://api.github.com/users/thymikee/orgs","repos_url":"https://api.github.com/users/thymikee/repos","events_url":"https://api.github.com/users/thymikee/events{/privacy}","received_events_url":"https://api.github.com/users/thymikee/received_events","type":"User","site_admin":false},"body":"<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. -->\r\n\r\n**Summary**\r\nFake timers are implemented as mocks. When defined in `package.json` with `\"timers\": \"fake\"` they set up mocking functions and work properly. However when combined with `\"resetMocks\": true` they're not restored and completely gone. \r\n\r\nThis is just a naive fix to the problem, but we can think of a better solution where we're actually in control of _resetting_ mocks instead of wiping them out. Not sure how to approach it though.\r\n\r\nPR includes integration test with these conflicting options.\r\n\r\nFixes #2455. \r\n\r\n**Test plan**\r\nIntegration test\r\n","created_at":"2016-12-29T19:23:39Z","updated_at":"2016-12-29T19:23:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/jest/pulls/2467/commits","review_comments_url":"https://api.github.com/repos/facebook/jest/pulls/2467/comments","review_comment_url":"https://api.github.com/repos/facebook/jest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/jest/issues/2467/comments","statuses_url":"https://api.github.com/repos/facebook/jest/statuses/cf6917aeb449c3d3f2d9bf1163dc243dc9c9e078","head":{"label":"thymikee:timers-with-resetMocks","ref":"timers-with-resetMocks","sha":"cf6917aeb449c3d3f2d9bf1163dc243dc9c9e078","user":{"login":"thymikee","id":5106466,"avatar_url":"https://avatars.githubusercontent.com/u/5106466?v=3","gravatar_id":"","url":"https://api.github.com/users/thymikee","html_url":"https://github.com/thymikee","followers_url":"https://api.github.com/users/thymikee/followers","following_url":"https://api.github.com/users/thymikee/following{/other_user}","gists_url":"https://api.github.com/users/thymikee/gists{/gist_id}","starred_url":"https://api.github.com/users/thymikee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thymikee/subscriptions","organizations_url":"https://api.github.com/users/thymikee/orgs","repos_url":"https://api.github.com/users/thymikee/repos","events_url":"https://api.github.com/users/thymikee/events{/privacy}","received_events_url":"https://api.github.com/users/thymikee/received_events","type":"User","site_admin":false},"repo":{"id":68306172,"name":"jest","full_name":"thymikee/jest","owner":{"login":"thymikee","id":5106466,"avatar_url":"https://avatars.githubusercontent.com/u/5106466?v=3","gravatar_id":"","url":"https://api.github.com/users/thymikee","html_url":"https://github.com/thymikee","followers_url":"https://api.github.com/users/thymikee/followers","following_url":"https://api.github.com/users/thymikee/following{/other_user}","gists_url":"https://api.github.com/users/thymikee/gists{/gist_id}","starred_url":"https://api.github.com/users/thymikee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thymikee/subscriptions","organizations_url":"https://api.github.com/users/thymikee/orgs","repos_url":"https://api.github.com/users/thymikee/repos","events_url":"https://api.github.com/users/thymikee/events{/privacy}","received_events_url":"https://api.github.com/users/thymikee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thymikee/jest","description":"Painless JavaScript Testing.","fork":true,"url":"https://api.github.com/repos/thymikee/jest","forks_url":"https://api.github.com/repos/thymikee/jest/forks","keys_url":"https://api.github.com/repos/thymikee/jest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thymikee/jest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thymikee/jest/teams","hooks_url":"https://api.github.com/repos/thymikee/jest/hooks","issue_events_url":"https://api.github.com/repos/thymikee/jest/issues/events{/number}","events_url":"https://api.github.com/repos/thymikee/jest/events","assignees_url":"https://api.github.com/repos/thymikee/jest/assignees{/user}","branches_url":"https://api.github.com/repos/thymikee/jest/branches{/branch}","tags_url":"https://api.github.com/repos/thymikee/jest/tags","blobs_url":"https://api.github.com/repos/thymikee/jest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thymikee/jest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thymikee/jest/git/refs{/sha}","trees_url":"https://api.github.com/repos/thymikee/jest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thymikee/jest/statuses/{sha}","languages_url":"https://api.github.com/repos/thymikee/jest/languages","stargazers_url":"https://api.github.com/repos/thymikee/jest/stargazers","contributors_url":"https://api.github.com/repos/thymikee/jest/contributors","subscribers_url":"https://api.github.com/repos/thymikee/jest/subscribers","subscription_url":"https://api.github.com/repos/thymikee/jest/subscription","commits_url":"https://api.github.com/repos/thymikee/jest/commits{/sha}","git_commits_url":"https://api.github.com/repos/thymikee/jest/git/commits{/sha}","comments_url":"https://api.github.com/repos/thymikee/jest/comments{/number}","issue_comment_url":"https://api.github.com/repos/thymikee/jest/issues/comments{/number}","contents_url":"https://api.github.com/repos/thymikee/jest/contents/{+path}","compare_url":"https://api.github.com/repos/thymikee/jest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thymikee/jest/merges","archive_url":"https://api.github.com/repos/thymikee/jest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thymikee/jest/downloads","issues_url":"https://api.github.com/repos/thymikee/jest/issues{/number}","pulls_url":"https://api.github.com/repos/thymikee/jest/pulls{/number}","milestones_url":"https://api.github.com/repos/thymikee/jest/milestones{/number}","notifications_url":"https://api.github.com/repos/thymikee/jest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thymikee/jest/labels{/name}","releases_url":"https://api.github.com/repos/thymikee/jest/releases{/id}","deployments_url":"https://api.github.com/repos/thymikee/jest/deployments","created_at":"2016-09-15T15:25:55Z","updated_at":"2016-09-15T15:25:58Z","pushed_at":"2016-12-29T19:16:04Z","git_url":"git://github.com/thymikee/jest.git","ssh_url":"git@github.com:thymikee/jest.git","clone_url":"https://github.com/thymikee/jest.git","svn_url":"https://github.com/thymikee/jest","homepage":"http://facebook.github.io/jest/","size":8951,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"cf1f00a1d97c07fd4a1ca9f2481b86e2026d9744","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":15062869,"name":"jest","full_name":"facebook/jest","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/jest","description":"🃏 Painless JavaScript Testing.","fork":false,"url":"https://api.github.com/repos/facebook/jest","forks_url":"https://api.github.com/repos/facebook/jest/forks","keys_url":"https://api.github.com/repos/facebook/jest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/jest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/jest/teams","hooks_url":"https://api.github.com/repos/facebook/jest/hooks","issue_events_url":"https://api.github.com/repos/facebook/jest/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/jest/events","assignees_url":"https://api.github.com/repos/facebook/jest/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/jest/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/jest/tags","blobs_url":"https://api.github.com/repos/facebook/jest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/jest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/jest/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/jest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/jest/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/jest/languages","stargazers_url":"https://api.github.com/repos/facebook/jest/stargazers","contributors_url":"https://api.github.com/repos/facebook/jest/contributors","subscribers_url":"https://api.github.com/repos/facebook/jest/subscribers","subscription_url":"https://api.github.com/repos/facebook/jest/subscription","commits_url":"https://api.github.com/repos/facebook/jest/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/jest/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/jest/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/jest/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/jest/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/jest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/jest/merges","archive_url":"https://api.github.com/repos/facebook/jest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/jest/downloads","issues_url":"https://api.github.com/repos/facebook/jest/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/jest/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/jest/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/jest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/jest/labels{/name}","releases_url":"https://api.github.com/repos/facebook/jest/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/jest/deployments","created_at":"2013-12-10T00:18:04Z","updated_at":"2016-12-29T19:04:59Z","pushed_at":"2016-12-29T18:47:55Z","git_url":"git://github.com/facebook/jest.git","ssh_url":"git@github.com:facebook/jest.git","clone_url":"https://github.com/facebook/jest.git","svn_url":"https://github.com/facebook/jest","homepage":"http://facebook.github.io/jest/","size":9233,"stargazers_count":7280,"watchers_count":7280,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":865,"mirror_url":null,"open_issues_count":122,"forks":865,"open_issues":122,"watchers":7280,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/jest/pulls/2467"},"html":{"href":"https://github.com/facebook/jest/pull/2467"},"issue":{"href":"https://api.github.com/repos/facebook/jest/issues/2467"},"comments":{"href":"https://api.github.com/repos/facebook/jest/issues/2467/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/jest/pulls/2467/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/jest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/jest/pulls/2467/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/jest/statuses/cf6917aeb449c3d3f2d9bf1163dc243dc9c9e078"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":36,"deletions":5,"changed_files":8}}
{"actor":{"display_login":"thymikee"}}