{"action":"created","issue":{"url":"https://api.github.com/repos/6to5/karma-6to5-preprocessor/issues/4","labels_url":"https://api.github.com/repos/6to5/karma-6to5-preprocessor/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/6to5/karma-6to5-preprocessor/issues/4/comments","events_url":"https://api.github.com/repos/6to5/karma-6to5-preprocessor/issues/4/events","html_url":"https://github.com/6to5/karma-6to5-preprocessor/issues/4","id":56593917,"number":4,"title":"Source maps not used in error output","user":{"login":"morrissinger","id":450066,"avatar_url":"https://avatars.githubusercontent.com/u/450066?v=3","gravatar_id":"","url":"https://api.github.com/users/morrissinger","html_url":"https://github.com/morrissinger","followers_url":"https://api.github.com/users/morrissinger/followers","following_url":"https://api.github.com/users/morrissinger/following{/other_user}","gists_url":"https://api.github.com/users/morrissinger/gists{/gist_id}","starred_url":"https://api.github.com/users/morrissinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morrissinger/subscriptions","organizations_url":"https://api.github.com/users/morrissinger/orgs","repos_url":"https://api.github.com/users/morrissinger/repos","events_url":"https://api.github.com/users/morrissinger/events{/privacy}","received_events_url":"https://api.github.com/users/morrissinger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-04T21:57:56Z","updated_at":"2015-02-04T22:52:45Z","closed_at":null,"body":"I have a test that looks like:\r\n\r\n```\r\ndescribe('foo', () => {\r\n\tit('bars', (done) => {\r\n\t\tthrow new Error('foo');\r\n\t\tdone();\r\n\t});\r\n});\r\n```\r\n\r\nIt is intentionally designed to fail on line 4 (where the error is thrown). My Karma configuration is set to use the 6to5 preprocessor with sourcemaps:\r\n\r\n```\r\n/*...*/\r\npreprocessors: {\r\n  'path/to/**/*.js': ['6to5']\r\n},\r\n\r\n'6to5Preprocessor': {\r\n  options: {\r\n    sourceMap: 'inline'\r\n  },\r\n  filename: function(file) {\r\n    return file.originalPath.replace(/\\.js$/, '.es5.js');\r\n  },\r\n  sourceFileName: function(file) {\r\n    return file.originalPath;\r\n  }\r\n},\r\n/*...*/\r\n```\r\n\r\nYet, the output from karma is displaying the line number of the error in the post-processed output, rather than using the sourcemap:\r\n\r\n```\r\nError: foo at Context.<anonymous> (/path/to/file-spec.es5.js:5:9)\r\n```\r\nThe documentation on this repo is not extensive, so it is possible that I have unknowingly misconfigured something; however, I assume that using the example from the documentation should offer me something workable.\r\n\r\n**Note: I have tried this with PhantomJS and with Chrome.**\r\n\r\nCan you confirm that this is a bug, or that I have made a mistake? I am happy to work on a fork to resolve this if need be."},"comment":{"url":"https://api.github.com/repos/6to5/karma-6to5-preprocessor/issues/comments/72957883","html_url":"https://github.com/6to5/karma-6to5-preprocessor/issues/4#issuecomment-72957883","issue_url":"https://api.github.com/repos/6to5/karma-6to5-preprocessor/issues/4","id":72957883,"user":{"login":"morrissinger","id":450066,"avatar_url":"https://avatars.githubusercontent.com/u/450066?v=3","gravatar_id":"","url":"https://api.github.com/users/morrissinger","html_url":"https://github.com/morrissinger","followers_url":"https://api.github.com/users/morrissinger/followers","following_url":"https://api.github.com/users/morrissinger/following{/other_user}","gists_url":"https://api.github.com/users/morrissinger/gists{/gist_id}","starred_url":"https://api.github.com/users/morrissinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morrissinger/subscriptions","organizations_url":"https://api.github.com/users/morrissinger/orgs","repos_url":"https://api.github.com/users/morrissinger/repos","events_url":"https://api.github.com/users/morrissinger/events{/privacy}","received_events_url":"https://api.github.com/users/morrissinger/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T22:52:45Z","updated_at":"2015-02-04T22:52:45Z","body":"@sebmck, these files run in the browser and I'm not using browserify or anything, so a `require()` call will not work."}}