{"action":"created","issue":{"url":"https://api.github.com/repos/thlorenz/proxyquire/issues/77","labels_url":"https://api.github.com/repos/thlorenz/proxyquire/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/thlorenz/proxyquire/issues/77/comments","events_url":"https://api.github.com/repos/thlorenz/proxyquire/issues/77/events","html_url":"https://github.com/thlorenz/proxyquire/issues/77","id":104387169,"number":77,"title":"A way to fake require.resolve function","user":{"login":"gyandeeps","id":5554486,"avatar_url":"https://avatars.githubusercontent.com/u/5554486?v=3","gravatar_id":"","url":"https://api.github.com/users/gyandeeps","html_url":"https://github.com/gyandeeps","followers_url":"https://api.github.com/users/gyandeeps/followers","following_url":"https://api.github.com/users/gyandeeps/following{/other_user}","gists_url":"https://api.github.com/users/gyandeeps/gists{/gist_id}","starred_url":"https://api.github.com/users/gyandeeps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyandeeps/subscriptions","organizations_url":"https://api.github.com/users/gyandeeps/orgs","repos_url":"https://api.github.com/users/gyandeeps/repos","events_url":"https://api.github.com/users/gyandeeps/events{/privacy}","received_events_url":"https://api.github.com/users/gyandeeps/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-02T01:42:33Z","updated_at":"2015-09-02T15:37:42Z","closed_at":"2015-09-02T02:12:55Z","body":"To start I want to say its an excellent module. Thanks for the great work.\r\n\r\nNow I do use proxyquire to fake certain modules, that works great. But in my application i use the function `require.resolve` function to get the path of the dependency but I am not able to fake it.\r\n\r\nExample code:\r\n```js\r\nfunction getPlugin(pluginName){\r\n    var plugin = require(pluginName);\r\n    var pluginPath = require.resolve(pluginName); // ---> Error here\r\n    \r\n    return {\r\n        api: plugin,\r\n        path: pluginPath\r\n    };\r\n}\r\n```\r\n\r\nSince I use proxyquire so `require` works but it throws an error on line 3."},"comment":{"url":"https://api.github.com/repos/thlorenz/proxyquire/issues/comments/137136635","html_url":"https://github.com/thlorenz/proxyquire/issues/77#issuecomment-137136635","issue_url":"https://api.github.com/repos/thlorenz/proxyquire/issues/77","id":137136635,"user":{"login":"gyandeeps","id":5554486,"avatar_url":"https://avatars.githubusercontent.com/u/5554486?v=3","gravatar_id":"","url":"https://api.github.com/users/gyandeeps","html_url":"https://github.com/gyandeeps","followers_url":"https://api.github.com/users/gyandeeps/followers","following_url":"https://api.github.com/users/gyandeeps/following{/other_user}","gists_url":"https://api.github.com/users/gyandeeps/gists{/gist_id}","starred_url":"https://api.github.com/users/gyandeeps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyandeeps/subscriptions","organizations_url":"https://api.github.com/users/gyandeeps/orgs","repos_url":"https://api.github.com/users/gyandeeps/repos","events_url":"https://api.github.com/users/gyandeeps/events{/privacy}","received_events_url":"https://api.github.com/users/gyandeeps/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T15:37:42Z","updated_at":"2015-09-02T15:37:42Z","body":"Will do that. Can you please assign this issue to me so that it comes up on my todo list.\r\nfyi, I might take some time to get to this.\r\nThanks"}}