{"action":"opened","issue":{"url":"https://api.github.com/repos/maenu/grunt-template-jasmine-istanbul/issues/56","repository_url":"https://api.github.com/repos/maenu/grunt-template-jasmine-istanbul","labels_url":"https://api.github.com/repos/maenu/grunt-template-jasmine-istanbul/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/maenu/grunt-template-jasmine-istanbul/issues/56/comments","events_url":"https://api.github.com/repos/maenu/grunt-template-jasmine-istanbul/issues/56/events","html_url":"https://github.com/maenu/grunt-template-jasmine-istanbul/issues/56","id":135711554,"number":56,"title":"Web Worker isn't showing in the coverage report","user":{"login":"dnln","id":2786395,"avatar_url":"https://avatars.githubusercontent.com/u/2786395?v=3","gravatar_id":"","url":"https://api.github.com/users/dnln","html_url":"https://github.com/dnln","followers_url":"https://api.github.com/users/dnln/followers","following_url":"https://api.github.com/users/dnln/following{/other_user}","gists_url":"https://api.github.com/users/dnln/gists{/gist_id}","starred_url":"https://api.github.com/users/dnln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnln/subscriptions","organizations_url":"https://api.github.com/users/dnln/orgs","repos_url":"https://api.github.com/users/dnln/repos","events_url":"https://api.github.com/users/dnln/events{/privacy}","received_events_url":"https://api.github.com/users/dnln/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-23T11:32:11Z","updated_at":"2016-02-23T11:32:11Z","closed_at":null,"body":"Firstly, this tool has been really helpful for integrating Istanbul into my project. Thanks for taking the time to maintain it.\r\n\r\nI've been using this for a few months with grunt-contrib-jasmine and recently tried using it to get coverage reports on a web worker.\r\n\r\nGiven the following scenario Istanbul is showing no coverage for worker.js, however the worker is being called and the test is passing.\r\n\r\nworker.js:\r\n```\r\nself.addEventListener('message', function(e) {\r\n\r\n      self.postMessage(e.data + \" world\"); \r\n\r\n}, false);\r\n```\r\n\r\ntestSpec.js:\r\n```\r\ndescribe('worker test', function() {\r\n\t\r\n\tit('should pass', function(done) {\r\n\t\t\t\r\n\t\tvar worker = new Worker('worker.js');\r\n\r\n\t\tworker.addEventListener('message', function (e) {\r\n\t\t\t    expect(e.data).toEqual('hello world');\r\n\t\t\t    done();\r\n\t\t});\r\n\r\n\t\tworker.postMessage('hello');\r\n\r\n\t});\r\n\r\n});\r\n```\r\n\r\nGruntFile.js:\r\n\r\n```\r\nmodule.exports = function(grunt) {\r\n\r\n\t    grunt.initConfig({\r\n\t        jasmine: {\r\n\t            coverage: {\r\n\t                src: ['worker.js'],\r\n\t                options: {\r\n\t                    specs: 'testSpec.js',\r\n\t                    template: require('grunt-template-jasmine-istanbul'),\r\n\t                    templateOptions: {\r\n\t                        coverage: 'bin/coverage.json',\r\n\t                        report: [\r\n\t                            {\r\n\t                                type: 'html',\r\n\t                                options: {\r\n\t                                    dir: 'bin/html'\r\n\t                                }\r\n\t                            },\r\n\t                            {\r\n\t                                type: 'cobertura',\r\n\t                                options: {\r\n\t                                    dir: 'bin/cobertura'\r\n\t                                }\r\n\t                            },\r\n\t                            {\r\n\t                                type: 'text-summary'\r\n\t                            }\r\n\t                        ]\r\n\t                    }\r\n\t                }\r\n\t            }\r\n\t        }\r\n\t    });\r\n\r\n\t    grunt.loadNpmTasks('grunt-contrib-jasmine');\r\n\r\n\t    grunt.registerTask('default', ['jasmine'])\r\n\r\n};\r\n```\r\n\r\nThis results in the following:\r\n\r\n![screen shot 2016-02-23 at 11 13 21](https://cloud.githubusercontent.com/assets/2786395/13249853/8158cb02-da1e-11e5-8970-df1a86503482.png)\r\n\r\n![screen shot 2016-02-23 at 11 11 47](https://cloud.githubusercontent.com/assets/2786395/13249817/652d0a06-da1e-11e5-8932-026391dfbf64.png)\r\n\r\nIs this expected? And if so, is there any way of capturing the coverage of a Web Worker using grunt-template-jasmine-istanbul?"}}