{"action":"created","issue":{"url":"https://api.github.com/repos/felixge/node-sandboxed-module/issues/39","repository_url":"https://api.github.com/repos/felixge/node-sandboxed-module","labels_url":"https://api.github.com/repos/felixge/node-sandboxed-module/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/felixge/node-sandboxed-module/issues/39/comments","events_url":"https://api.github.com/repos/felixge/node-sandboxed-module/issues/39/events","html_url":"https://github.com/felixge/node-sandboxed-module/issues/39","id":47270778,"number":39,"title":"Istanbul source transformer and node_modules","user":{"login":"elliotstokes","id":4385563,"avatar_url":"https://avatars.githubusercontent.com/u/4385563?v=3","gravatar_id":"","url":"https://api.github.com/users/elliotstokes","html_url":"https://github.com/elliotstokes","followers_url":"https://api.github.com/users/elliotstokes/followers","following_url":"https://api.github.com/users/elliotstokes/following{/other_user}","gists_url":"https://api.github.com/users/elliotstokes/gists{/gist_id}","starred_url":"https://api.github.com/users/elliotstokes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliotstokes/subscriptions","organizations_url":"https://api.github.com/users/elliotstokes/orgs","repos_url":"https://api.github.com/users/elliotstokes/repos","events_url":"https://api.github.com/users/elliotstokes/events{/privacy}","received_events_url":"https://api.github.com/users/elliotstokes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2014-10-30T13:42:42Z","updated_at":"2016-07-19T16:52:44Z","closed_at":"2015-03-16T08:38:21Z","body":"I have been using the Istanbul source transformer and it works great. I have a small issue though that it doesn't ignore the node_modules folder and am getting code_coverage for these (i.e. underscore). I have written a work-around to get around this locally. Could we get this or someway to ignore files and paths included?\r\n\r\nWill happily send you a push request if you think its worth it."},"comment":{"url":"https://api.github.com/repos/felixge/node-sandboxed-module/issues/comments/233695976","html_url":"https://github.com/felixge/node-sandboxed-module/issues/39#issuecomment-233695976","issue_url":"https://api.github.com/repos/felixge/node-sandboxed-module/issues/39","id":233695976,"user":{"login":"ccprog","id":5325416,"avatar_url":"https://avatars.githubusercontent.com/u/5325416?v=3","gravatar_id":"","url":"https://api.github.com/users/ccprog","html_url":"https://github.com/ccprog","followers_url":"https://api.github.com/users/ccprog/followers","following_url":"https://api.github.com/users/ccprog/following{/other_user}","gists_url":"https://api.github.com/users/ccprog/gists{/gist_id}","starred_url":"https://api.github.com/users/ccprog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccprog/subscriptions","organizations_url":"https://api.github.com/users/ccprog/orgs","repos_url":"https://api.github.com/users/ccprog/repos","events_url":"https://api.github.com/users/ccprog/events{/privacy}","received_events_url":"https://api.github.com/users/ccprog/received_events","type":"User","site_admin":false},"created_at":"2016-07-19T16:52:43Z","updated_at":"2016-07-19T16:52:43Z","body":"I'm too quick today. After more testing, I do not understand how this is supposed to work. Consider this jasmine clause:\r\n```js\r\n    var stdin, utils, spawn, iconize;\r\n    var spawnLineFn, normalizeCallbacks = {};\r\n\r\n    beforeEach(function () {\r\n        stdin = {\r\n            write: jasmine.createSpy('write')\r\n        };\r\n        utils = {\r\n            normalize: function (fn, callback) {\r\n                normalizeCallbacks[fn] = callback;\r\n            },\r\n            handleErr: jasmine.createSpy('handleErr')\r\n        };\r\n        spyOn(utils, 'normalize').and.callThrough();\r\n        spawn = jasmine.createSpy('spawn')\r\n                .and.callFake(function (cmd, lineFn) {\r\n            spawnLineFn = lineFn;\r\n            return stdin;\r\n        });\r\n        iconize = SandboxedModule.require('../../lib/iconize-png.js', {\r\n            requires: { './utils': utils, './spawn': spawn },\r\n            globals: { 'console': { log: () => {} } }\r\n        });\r\n    });\r\n```\r\nThe tested module has an additional `require('async')`, it will be included in coverage if used like this.\r\n\r\nAdding `sourceTransformersSingleOnly: true` does not change this, it is still in the results.\r\n\r\nAdding `singleOnly: true` leads to the spec failing, because the mocks are not available.\r\n\r\nRequiring async in the spec and adding it to the requires:\r\n```js\r\nvar async = require('async');\r\n//...\r\n            requires: { 'async': async, './utils': utils, './spawn': spawn },\r\n```\r\nexcludes async from coverage."}}
{"actor":{"display_login":"ccprog"}}