{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/6420","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/6420/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/6420/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/6420/events","html_url":"https://github.com/facebook/jest/issues/6420","id":330656564,"node_id":"MDU6SXNzdWUzMzA2NTY1NjQ=","number":6420,"title":"jest.mock() does not work when module name has \".js\" in it","user":{"login":"janhon3n","id":10882895,"node_id":"MDQ6VXNlcjEwODgyODk1","avatar_url":"https://avatars1.githubusercontent.com/u/10882895?v=4","gravatar_id":"","url":"https://api.github.com/users/janhon3n","html_url":"https://github.com/janhon3n","followers_url":"https://api.github.com/users/janhon3n/followers","following_url":"https://api.github.com/users/janhon3n/following{/other_user}","gists_url":"https://api.github.com/users/janhon3n/gists{/gist_id}","starred_url":"https://api.github.com/users/janhon3n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janhon3n/subscriptions","organizations_url":"https://api.github.com/users/janhon3n/orgs","repos_url":"https://api.github.com/users/janhon3n/repos","events_url":"https://api.github.com/users/janhon3n/events{/privacy}","received_events_url":"https://api.github.com/users/janhon3n/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-08T13:22:57Z","updated_at":"2018-06-22T15:02:29Z","closed_at":"2018-06-11T07:24:00Z","author_association":"NONE","body":"## 💬 Questions and Help\r\n\r\nI am trying to mock the \"react-plotly.js\" module, but when i am running test files with\r\n`jest.mock(\"react-plotly.js\")`\r\nin them, the execution fails with the following error message:\r\n\r\n`Test suite failed to run`\r\n`TypeError: window.URL.createObjectURL is not a function`\r\n\r\nWhen testing the exact same test but with all \"react-plotly.js\" imports changed to \"react-plotly\", the test execute fine. It seems to me like the dot in the module name is breaking the mocking."},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/399472942","html_url":"https://github.com/facebook/jest/issues/6420#issuecomment-399472942","issue_url":"https://api.github.com/repos/facebook/jest/issues/6420","id":399472942,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTQ3Mjk0Mg==","user":{"login":"ThinkFWD","id":24907731,"node_id":"MDQ6VXNlcjI0OTA3NzMx","avatar_url":"https://avatars2.githubusercontent.com/u/24907731?v=4","gravatar_id":"","url":"https://api.github.com/users/ThinkFWD","html_url":"https://github.com/ThinkFWD","followers_url":"https://api.github.com/users/ThinkFWD/followers","following_url":"https://api.github.com/users/ThinkFWD/following{/other_user}","gists_url":"https://api.github.com/users/ThinkFWD/gists{/gist_id}","starred_url":"https://api.github.com/users/ThinkFWD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThinkFWD/subscriptions","organizations_url":"https://api.github.com/users/ThinkFWD/orgs","repos_url":"https://api.github.com/users/ThinkFWD/repos","events_url":"https://api.github.com/users/ThinkFWD/events{/privacy}","received_events_url":"https://api.github.com/users/ThinkFWD/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T15:02:29Z","updated_at":"2018-06-22T15:02:29Z","author_association":"NONE","body":"I have the same problem, what was your solution?"}}
{"actor":{"display_login":"ThinkFWD"}}