{"action":"created","issue":{"url":"https://api.github.com/repos/mochajs/mocha/issues/2480","repository_url":"https://api.github.com/repos/mochajs/mocha","labels_url":"https://api.github.com/repos/mochajs/mocha/issues/2480/labels{/name}","comments_url":"https://api.github.com/repos/mochajs/mocha/issues/2480/comments","events_url":"https://api.github.com/repos/mochajs/mocha/issues/2480/events","html_url":"https://github.com/mochajs/mocha/issues/2480","id":177146530,"number":2480,"title":"babel-register: stack trace with correct line numbers","user":{"login":"alexey2baranov","id":19248996,"avatar_url":"https://avatars.githubusercontent.com/u/19248996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey2baranov","html_url":"https://github.com/alexey2baranov","followers_url":"https://api.github.com/users/alexey2baranov/followers","following_url":"https://api.github.com/users/alexey2baranov/following{/other_user}","gists_url":"https://api.github.com/users/alexey2baranov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey2baranov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey2baranov/subscriptions","organizations_url":"https://api.github.com/users/alexey2baranov/orgs","repos_url":"https://api.github.com/users/alexey2baranov/repos","events_url":"https://api.github.com/users/alexey2baranov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey2baranov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-15T10:56:09Z","updated_at":"2016-09-17T00:03:32Z","closed_at":"2016-09-17T00:03:32Z","body":"hello! \r\n\r\nWe have test sute writen on ES2015 and run mocha as writted on official site with parameter **--compilers js:babel-register**. Everything goes well except error stack trace. We get incorrect line numbers into console when Mocha fail test. \r\n\r\nExample:\r\n\r\n> TypeError: Cannot read property 'listenerCount' of undefined\r\n>     at Context.<anonymous> (test/view/SlovoAsListItemView.Test.js:184:32)\r\n\r\nSlovoAsListItemView.Test.js has 79 lines at all. Not 184! As far as I can see babel transpile our code into ES 5 and it grows up to 184+ lines. And then Mocha get this temp file and execute it as a source.\r\n\r\nHow can we get correct line numbers into console?\r\n\r\npackage.json with babel section\r\n```json\r\n{\r\n...\r\n    \"babel\": {\r\n        \"plugins\": [\r\n            \"fast-async\",\r\n            \"transform-class-properties\",\r\n            \"transform-es2015-parameters\",\r\n            \"transform-es2015-destructuring\"\r\n        ],\r\n        \"sourceMaps\": \"inline\"\r\n    }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mochajs/mocha/issues/comments/247734975","html_url":"https://github.com/mochajs/mocha/issues/2480#issuecomment-247734975","issue_url":"https://api.github.com/repos/mochajs/mocha/issues/2480","id":247734975,"user":{"login":"boneskull","id":924465,"avatar_url":"https://avatars.githubusercontent.com/u/924465?v=3","gravatar_id":"","url":"https://api.github.com/users/boneskull","html_url":"https://github.com/boneskull","followers_url":"https://api.github.com/users/boneskull/followers","following_url":"https://api.github.com/users/boneskull/following{/other_user}","gists_url":"https://api.github.com/users/boneskull/gists{/gist_id}","starred_url":"https://api.github.com/users/boneskull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boneskull/subscriptions","organizations_url":"https://api.github.com/users/boneskull/orgs","repos_url":"https://api.github.com/users/boneskull/repos","events_url":"https://api.github.com/users/boneskull/events{/privacy}","received_events_url":"https://api.github.com/users/boneskull/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T00:03:32Z","updated_at":"2016-09-17T00:03:32Z","body":"`--require source-map-support` probably.  Try `\"sourceMaps\": \"both\"` as well.  \r\n\r\nHint: use `--require babel-register` instead of `--compilers js:babel-register`."}}
{"actor":{"display_login":"boneskull"}}