{"action":"created","issue":{"url":"https://api.github.com/repos/benjamn/reify/issues/49","repository_url":"https://api.github.com/repos/benjamn/reify","labels_url":"https://api.github.com/repos/benjamn/reify/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/benjamn/reify/issues/49/comments","events_url":"https://api.github.com/repos/benjamn/reify/issues/49/events","html_url":"https://github.com/benjamn/reify/issues/49","id":180726917,"number":49,"title":"Capability to replace subdependencies like with proxyquire","user":{"login":"Sanjo","id":727955,"avatar_url":"https://avatars.githubusercontent.com/u/727955?v=3","gravatar_id":"","url":"https://api.github.com/users/Sanjo","html_url":"https://github.com/Sanjo","followers_url":"https://api.github.com/users/Sanjo/followers","following_url":"https://api.github.com/users/Sanjo/following{/other_user}","gists_url":"https://api.github.com/users/Sanjo/gists{/gist_id}","starred_url":"https://api.github.com/users/Sanjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sanjo/subscriptions","organizations_url":"https://api.github.com/users/Sanjo/orgs","repos_url":"https://api.github.com/users/Sanjo/repos","events_url":"https://api.github.com/users/Sanjo/events{/privacy}","received_events_url":"https://api.github.com/users/Sanjo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-03T19:35:51Z","updated_at":"2016-10-06T22:43:48Z","closed_at":null,"body":"For unit testing I need the capability to stub and spy on imported dependencies of my module under test. For CommonJS there is [proxyquire](https://github.com/thlorenz/proxyquire). I have this problem in the context of running tests with the Meteor test runner."},"comment":{"url":"https://api.github.com/repos/benjamn/reify/issues/comments/252109221","html_url":"https://github.com/benjamn/reify/issues/49#issuecomment-252109221","issue_url":"https://api.github.com/repos/benjamn/reify/issues/49","id":252109221,"user":{"login":"Sanjo","id":727955,"avatar_url":"https://avatars.githubusercontent.com/u/727955?v=3","gravatar_id":"","url":"https://api.github.com/users/Sanjo","html_url":"https://github.com/Sanjo","followers_url":"https://api.github.com/users/Sanjo/followers","following_url":"https://api.github.com/users/Sanjo/following{/other_user}","gists_url":"https://api.github.com/users/Sanjo/gists{/gist_id}","starred_url":"https://api.github.com/users/Sanjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sanjo/subscriptions","organizations_url":"https://api.github.com/users/Sanjo/orgs","repos_url":"https://api.github.com/users/Sanjo/repos","events_url":"https://api.github.com/users/Sanjo/events{/privacy}","received_events_url":"https://api.github.com/users/Sanjo/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T22:43:48Z","updated_at":"2016-10-06T22:43:48Z","body":"For now I run the unit and integration tests completely without the Meteor testing runner with CommonJS. I just read [Node.js, TC-39, and Modules](https://hackernoon.com/node-js-tc-39-and-modules-a1118aecf95e#95e5) which indicates that there will be hooks that make this possible. Not sure if this is already in the spec.\r\n\r\n> There are a wide variety of scenarios where this idempotency rule causes issues. Mocking, APM, and spying for testing purposes are primary examples. Fortunately, there are a number of ways this limitation can be addressed. One approach is to add hooks into the loading phase that would allow an ESM’s exports to be wrapped. Another is for TC-39 to allow loaded ESM’s to be replaced after they are loaded. Several mechanisms are being considered here. The good news is that while intercepting ESM’s will be different than intercepting CommonJS modules, interception will be possible."}}
{"actor":{"display_login":"Sanjo"}}