{"action":"created","issue":{"url":"https://api.github.com/repos/thedeeno/web-component-tester-istanbul/issues/12","repository_url":"https://api.github.com/repos/thedeeno/web-component-tester-istanbul","labels_url":"https://api.github.com/repos/thedeeno/web-component-tester-istanbul/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/thedeeno/web-component-tester-istanbul/issues/12/comments","events_url":"https://api.github.com/repos/thedeeno/web-component-tester-istanbul/issues/12/events","html_url":"https://github.com/thedeeno/web-component-tester-istanbul/issues/12","id":104361581,"number":12,"title":"Not getting any coverage?","user":{"login":"apowers313","id":5661534,"avatar_url":"https://avatars.githubusercontent.com/u/5661534?v=3","gravatar_id":"","url":"https://api.github.com/users/apowers313","html_url":"https://github.com/apowers313","followers_url":"https://api.github.com/users/apowers313/followers","following_url":"https://api.github.com/users/apowers313/following{/other_user}","gists_url":"https://api.github.com/users/apowers313/gists{/gist_id}","starred_url":"https://api.github.com/users/apowers313/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apowers313/subscriptions","organizations_url":"https://api.github.com/users/apowers313/orgs","repos_url":"https://api.github.com/users/apowers313/repos","events_url":"https://api.github.com/users/apowers313/events{/privacy}","received_events_url":"https://api.github.com/users/apowers313/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2015-09-01T21:48:10Z","updated_at":"2016-12-20T20:23:02Z","closed_at":null,"body":"I created a test where I have a `test.js` file that gets pulled into my Polymer source, and then gets called to initialize a property. It's just one function that calls a `console.log()` and returns a string.\n\nHere's what the instrumented code looks like:\n\n``` javascript\n\nvar __cov_k6FFswH3I_V2Z$AAqswV_Q = (Function('return this'))();\nif (!__cov_k6FFswH3I_V2Z$AAqswV_Q.WCT.share.__coverage__) { __cov_k6FFswH3I_V2Z$AAqswV_Q.WCT.share.__coverage__ = {}; }\n__cov_k6FFswH3I_V2Z$AAqswV_Q = __cov_k6FFswH3I_V2Z$AAqswV_Q.WCT.share.__coverage__;\nif (!(__cov_k6FFswH3I_V2Z$AAqswV_Q['/Users/apowers/Documents/Google Drive/Backup/Projects/switchboardComponents/bower_components/open-element-template/test.js'])) {\n   __cov_k6FFswH3I_V2Z$AAqswV_Q['/Users/apowers/Documents/Google Drive/Backup/Projects/switchboardComponents/bower_components/open-element-template/test.js'] = {\"path\":\"/Users/apowers/Documents/Google Drive/Backup/Projects/switchboardComponents/bower_components/open-element-template/test.js\",\"s\":{\"1\":1,\"2\":0,\"3\":0},\"b\":{},\"f\":{\"1\":0},\"fnMap\":{\"1\":{\"name\":\"getHelloWorldString\",\"line\":6,\"loc\":{\"start\":{\"line\":6,\"column\":0},\"end\":{\"line\":6,\"column\":31}}}},\"statementMap\":{\"1\":{\"start\":{\"line\":6,\"column\":0},\"end\":{\"line\":9,\"column\":1}},\"2\":{\"start\":{\"line\":7,\"column\":1},\"end\":{\"line\":7,\"column\":36}},\"3\":{\"start\":{\"line\":8,\"column\":1},\"end\":{\"line\":8,\"column\":68}}},\"branchMap\":{}};\n}\n__cov_k6FFswH3I_V2Z$AAqswV_Q = __cov_k6FFswH3I_V2Z$AAqswV_Q['/Users/apowers/Documents/Google Drive/Backup/Projects/switchboardComponents/bower_components/open-element-template/test.js'];\nfunction getHelloWorldString(){__cov_k6FFswH3I_V2Z$AAqswV_Q.f['1']++;__cov_k6FFswH3I_V2Z$AAqswV_Q.s['2']++;console.log('Hello from test.js');__cov_k6FFswH3I_V2Z$AAqswV_Q.s['3']++;return'HELLO WORLD. This is really annoying, but I hope it works';}\n```\n\nI can see the `console.log()` print out and the string gets returned just fine, however the Istanbul coverage report shows:\n\n```\n=============================== Coverage summary ===============================\nStatements   : 100% ( 0/0 )\nBranches     : 100% ( 0/0 )\nFunctions    : 100% ( 0/0 )\nLines        : 100% ( 0/0 )\n================================================================================\n```\n\nIt looks like although my `test.js` file is instrumented and called, it's not creating any code coverage.\n\nAny thoughts of what might be going wrong?\n\nOn a related note, should Istanbul be able to generate coverage for `.html` files too? I don't really think it's going to be feasible to pull all my JavaScript into separate .js files.\n"},"comment":{"url":"https://api.github.com/repos/thedeeno/web-component-tester-istanbul/issues/comments/268348562","html_url":"https://github.com/thedeeno/web-component-tester-istanbul/issues/12#issuecomment-268348562","issue_url":"https://api.github.com/repos/thedeeno/web-component-tester-istanbul/issues/12","id":268348562,"user":{"login":"klarkc","id":724959,"avatar_url":"https://avatars.githubusercontent.com/u/724959?v=3","gravatar_id":"","url":"https://api.github.com/users/klarkc","html_url":"https://github.com/klarkc","followers_url":"https://api.github.com/users/klarkc/followers","following_url":"https://api.github.com/users/klarkc/following{/other_user}","gists_url":"https://api.github.com/users/klarkc/gists{/gist_id}","starred_url":"https://api.github.com/users/klarkc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klarkc/subscriptions","organizations_url":"https://api.github.com/users/klarkc/orgs","repos_url":"https://api.github.com/users/klarkc/repos","events_url":"https://api.github.com/users/klarkc/events{/privacy}","received_events_url":"https://api.github.com/users/klarkc/received_events","type":"User","site_admin":false},"created_at":"2016-12-20T20:23:02Z","updated_at":"2016-12-20T20:23:02Z","body":"@apowers313 sry, I saw this open so I posted here, anyway seems that is the same issue of #38, so I will post there."}}
{"actor":{"display_login":"klarkc"}}