{"action":"created","issue":{"url":"https://api.github.com/repos/Constellation/ibrik/issues/28","labels_url":"https://api.github.com/repos/Constellation/ibrik/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/Constellation/ibrik/issues/28/comments","events_url":"https://api.github.com/repos/Constellation/ibrik/issues/28/events","html_url":"https://github.com/Constellation/ibrik/issues/28","id":56641939,"number":28,"title":"Possible bug fix for reporting coverage with grunt-karma, karma-jasmine and karma-coverage","user":{"login":"mattxo","id":6966145,"avatar_url":"https://avatars.githubusercontent.com/u/6966145?v=3","gravatar_id":"","url":"https://api.github.com/users/mattxo","html_url":"https://github.com/mattxo","followers_url":"https://api.github.com/users/mattxo/followers","following_url":"https://api.github.com/users/mattxo/following{/other_user}","gists_url":"https://api.github.com/users/mattxo/gists{/gist_id}","starred_url":"https://api.github.com/users/mattxo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattxo/subscriptions","organizations_url":"https://api.github.com/users/mattxo/orgs","repos_url":"https://api.github.com/users/mattxo/repos","events_url":"https://api.github.com/users/mattxo/events{/privacy}","received_events_url":"https://api.github.com/users/mattxo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-05T08:42:28Z","updated_at":"2015-03-19T06:55:49Z","closed_at":null,"body":"Hi,\r\n\r\nI've found that in ibrik/instrumenter.js, the code that is passed into Istanbul is compiled without the bare : true option. \r\n\r\n```javascript\r\n Instrumenter.prototype.instrumentSync = function(code, filename) {\r\n      var e, program;\r\n      filename = filename || (\"\" + (Date.now()) + \".js\");\r\n      if (typeof code !== 'string') {\r\n        throw new Error('Code must be string');\r\n      }\r\n      try {\r\n        code = coffee.compile(code, {\r\n            sourceMap: true,\r\n            *** bare : true ***\r\n        });\r\n        program = esprima.parse(code.js, {\r\n          loc: true\r\n        });\r\n        this.fixupLoc(program, code.sourceMap);\r\n        return this.instrumentASTSync(program, filename, code);\r\n      } catch (_error) {\r\n        e = _error;\r\n        e.message = \"Error compiling \" + filename + \": \" + e.message;\r\n        throw e;\r\n      }\r\n    };\r\n```\r\n\r\nKarma kept reporting that my classes in CoffeeScript were undefined until I added that compiler flag in the ibrik source!\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Constellation/ibrik/issues/comments/83371826","html_url":"https://github.com/Constellation/ibrik/issues/28#issuecomment-83371826","issue_url":"https://api.github.com/repos/Constellation/ibrik/issues/28","id":83371826,"user":{"login":"asceresini","id":797347,"avatar_url":"https://avatars.githubusercontent.com/u/797347?v=3","gravatar_id":"","url":"https://api.github.com/users/asceresini","html_url":"https://github.com/asceresini","followers_url":"https://api.github.com/users/asceresini/followers","following_url":"https://api.github.com/users/asceresini/following{/other_user}","gists_url":"https://api.github.com/users/asceresini/gists{/gist_id}","starred_url":"https://api.github.com/users/asceresini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asceresini/subscriptions","organizations_url":"https://api.github.com/users/asceresini/orgs","repos_url":"https://api.github.com/users/asceresini/repos","events_url":"https://api.github.com/users/asceresini/events{/privacy}","received_events_url":"https://api.github.com/users/asceresini/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T06:55:49Z","updated_at":"2015-03-19T06:55:49Z","body":"The exact same problem, and this also fixed it for me."}}