{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/1249","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/1249/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/1249/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/1249/events","html_url":"https://github.com/facebook/jest/issues/1249","id":163983025,"number":1249,"title":"jest.resetModuleRegistry() resets mocks","user":{"login":"sebmarkbage","id":63648,"avatar_url":"https://avatars.githubusercontent.com/u/63648?v=3","gravatar_id":"","url":"https://api.github.com/users/sebmarkbage","html_url":"https://github.com/sebmarkbage","followers_url":"https://api.github.com/users/sebmarkbage/followers","following_url":"https://api.github.com/users/sebmarkbage/following{/other_user}","gists_url":"https://api.github.com/users/sebmarkbage/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmarkbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmarkbage/subscriptions","organizations_url":"https://api.github.com/users/sebmarkbage/orgs","repos_url":"https://api.github.com/users/sebmarkbage/repos","events_url":"https://api.github.com/users/sebmarkbage/events{/privacy}","received_events_url":"https://api.github.com/users/sebmarkbage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-06T01:56:29Z","updated_at":"2016-07-06T02:00:23Z","closed_at":null,"body":"I'm not sure if this is intentional or not but I'd like to have a way to reset the state of all modules like `jest.resetModuleRegistry()`. However, I'd like to keep all the mock files I have without explicitly having to call `jest.mock(...)` everywhere I clear the cache.\r\n\r\nMy use case:\r\n\r\nhttps://github.com/sebmarkbage/react/commit/0195de2a5cb679838f93f9d85530bbb1470091f4\r\n\r\nNote that I have to add an explicit `jest.mock('ReactDOM')` which I otherwise don't need."},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/230653000","html_url":"https://github.com/facebook/jest/issues/1249#issuecomment-230653000","issue_url":"https://api.github.com/repos/facebook/jest/issues/1249","id":230653000,"user":{"login":"cpojer","id":13352,"avatar_url":"https://avatars.githubusercontent.com/u/13352?v=3","gravatar_id":"","url":"https://api.github.com/users/cpojer","html_url":"https://github.com/cpojer","followers_url":"https://api.github.com/users/cpojer/followers","following_url":"https://api.github.com/users/cpojer/following{/other_user}","gists_url":"https://api.github.com/users/cpojer/gists{/gist_id}","starred_url":"https://api.github.com/users/cpojer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpojer/subscriptions","organizations_url":"https://api.github.com/users/cpojer/orgs","repos_url":"https://api.github.com/users/cpojer/repos","events_url":"https://api.github.com/users/cpojer/events{/privacy}","received_events_url":"https://api.github.com/users/cpojer/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T02:00:23Z","updated_at":"2016-07-06T02:00:23Z","body":"I don't quite follow. Are you saying that everything that was required through or as a manual mock (`__mocks__`) should persist but everything else should be reset? I think that would be very confusing, especially since those mocks could retain references to modules that were reset, so you'd end up with multiple copies of certain dependencies."}}
{"actor":{"display_login":"cpojer"}}