{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/147","labels_url":"https://api.github.com/repos/facebook/jest/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/147/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/147/events","html_url":"https://github.com/facebook/jest/issues/147","id":45413379,"number":147,"title":"Some kind of magic in mocked calls","user":{"login":"dmitrig01","id":10422,"avatar_url":"https://avatars.githubusercontent.com/u/10422?v=3","gravatar_id":"","url":"https://api.github.com/users/dmitrig01","html_url":"https://github.com/dmitrig01","followers_url":"https://api.github.com/users/dmitrig01/followers","following_url":"https://api.github.com/users/dmitrig01/following{/other_user}","gists_url":"https://api.github.com/users/dmitrig01/gists{/gist_id}","starred_url":"https://api.github.com/users/dmitrig01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmitrig01/subscriptions","organizations_url":"https://api.github.com/users/dmitrig01/orgs","repos_url":"https://api.github.com/users/dmitrig01/repos","events_url":"https://api.github.com/users/dmitrig01/events{/privacy}","received_events_url":"https://api.github.com/users/dmitrig01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-10-09T20:29:57Z","updated_at":"2015-08-05T18:01:11Z","closed_at":null,"body":"Hi! I can't quite decode the logic here – please help me understand why this test is failing :-):\r\n\r\n**`one.js`**\r\n```javascript\r\nmodule.exports = function() { return 'This is irrelevant'; };\r\n```\r\n\r\n**`two.js`**\r\n```javascript\r\nvar one = require('./one');\r\none();\r\nmodule.exports = function() { };\r\n```\r\n\r\n**`three.js`**\r\n```javascript\r\nvar one = require('./one'), two = require('./two');\r\nmodule.exports = function() { return [ one(), two() ]; };\r\n```\r\n\r\n**`__tests__/three.js`**\r\n```javascript\r\njest.dontMock('../three');\r\n\r\ndescribe('', function() {\r\n\tit('', function() {\r\n\t\tvar three = require('../three');\r\n\t\tthree();\r\n\t\texpect(require('../one').mock.calls.length).toBe(2);\r\n\t});\r\n});\r\n```\r\n\r\nShouldn't `one` have been called twice, since even though `two` was a mocked file, it called anyway? I'm sure there's some rule or logic here, but I couldn't find it in the docs."},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/128092401","html_url":"https://github.com/facebook/jest/issues/147#issuecomment-128092401","issue_url":"https://api.github.com/repos/facebook/jest/issues/147","id":128092401,"user":{"login":"facebook-github-bot-3","id":8397447,"avatar_url":"https://avatars.githubusercontent.com/u/8397447?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot-3","html_url":"https://github.com/facebook-github-bot-3","followers_url":"https://api.github.com/users/facebook-github-bot-3/followers","following_url":"https://api.github.com/users/facebook-github-bot-3/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot-3/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot-3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot-3/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot-3/orgs","repos_url":"https://api.github.com/users/facebook-github-bot-3/repos","events_url":"https://api.github.com/users/facebook-github-bot-3/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot-3/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T18:01:11Z","updated_at":"2015-08-05T18:01:11Z","body":"Thank you for reporting this issue and appreciate your patience. We've  notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed."}}