{"action":"closed","issue":{"url":"https://api.github.com/repos/sindresorhus/ava/issues/289","labels_url":"https://api.github.com/repos/sindresorhus/ava/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/ava/issues/289/comments","events_url":"https://api.github.com/repos/sindresorhus/ava/issues/289/events","html_url":"https://github.com/sindresorhus/ava/issues/289","id":119568696,"number":289,"title":"0.7.0 crashes when used with bluebird's coroutines and sourcemaps","user":{"login":"alubbe","id":2028065,"avatar_url":"https://avatars.githubusercontent.com/u/2028065?v=3","gravatar_id":"","url":"https://api.github.com/users/alubbe","html_url":"https://github.com/alubbe","followers_url":"https://api.github.com/users/alubbe/followers","following_url":"https://api.github.com/users/alubbe/following{/other_user}","gists_url":"https://api.github.com/users/alubbe/gists{/gist_id}","starred_url":"https://api.github.com/users/alubbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alubbe/subscriptions","organizations_url":"https://api.github.com/users/alubbe/orgs","repos_url":"https://api.github.com/users/alubbe/repos","events_url":"https://api.github.com/users/alubbe/events{/privacy}","received_events_url":"https://api.github.com/users/alubbe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-11-30T20:02:52Z","updated_at":"2016-01-01T23:30:29Z","closed_at":"2016-01-01T23:30:29Z","body":"This simple test runs fine on 0.7.0 with source maps disabled and on 0.6.1 with source maps enabled, but crashes on 0.7.0 with source maps enabled:\r\n```coffee\r\ntest = require \"ava\"\r\nPromise = require \"bluebird\"\r\n\r\ntest \"peter\", Promise.coroutine (t) ->\r\n  yield Promise.delay 500\r\n```\r\nThe error is \r\n```\r\nUncaught Exception:  xxx/test2.js\r\n  Error: No element indexed by 1\r\n    at ArraySet_at [as at] (xxx/node_modules/source-map-support/node_modules/source-map/lib/source-map/array-set.js:83:11)\r\n    at SourceMapConsumer_parseMappings [as _parseMappings] (xxx/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js:220:44)\r\n    at SourceMapConsumer.Object.defineProperty.get (xxx/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js:160:14)\r\n    at SourceMapConsumer_originalPositionFor [as originalPositionFor] (xxx/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js:311:43)\r\n    at mapSourcePosition (xxx/node_modules/source-map-support/source-map-support.js:168:42)\r\n    at wrapCallSite (xxx/node_modules/source-map-support/source-map-support.js:303:20)\r\n    at Function.prepareStackTrace (xxx/node_modules/source-map-support/source-map-support.js:337:24)\r\n    at Function.Promise.coroutine (xxx/node_modules/bluebird/js/release/generators.js:175:28)\r\n    at Object.<anonymous> (xxx/test2.coffee:4:33)\r\n    at requireFromString (xxx/node_modules/require-from-string/index.js:26:4)\r\n```\r\nWith sourcemaps on, coffee produces\r\n```js\r\n// Generated by CoffeeScript 1.10.0\r\n(function() {\r\n  var Promise, test;\r\n\r\n  test = require(\"ava\");\r\n\r\n  Promise = require(\"bluebird\");\r\n\r\n  test(\"peter\", Promise.coroutine(function*(t) {\r\n    return (yield Promise.delay(500));\r\n  }));\r\n\r\n}).call(this);\r\n\r\n//# sourceMappingURL=test2.js.map\r\n```\r\nand\r\n```json\r\n{\r\n  \"version\": 3,\r\n  \"file\": \"test2.js\",\r\n  \"sourceRoot\": \"\",\r\n  \"sources\": [\r\n    \"test2.coffee\"\r\n  ],\r\n  \"names\": [],\r\n  \"mappings\": \";AAAA;AAAA,MAAA;;EAAA,IAAA,GAAO,OAAA,CAAQ,KAAR;;EACP,OAAA,GAAU,OAAA,CAAQ,UAAR;;EAEV,IAAA,CAAK,OAAL,EAAc,OAAO,CAAC,SAAR,CAAkB,UAAC,CAAD;WAC9B,OAAM,OAAO,CAAC,KAAR,CAAc,GAAd,CAAN;EAD8B,CAAlB,CAAd;AAHA\"\r\n}\r\n```\r\nSource maps and 0.7.0 work fine on synchronous tests and on those returning a promise, maybe that helps in pinpointing the issue.\r\nI'm using bluebird@3.0.5 and used this command to run the tests:\r\n```\r\ncoffee --compile --map . && ava test2.js\r\n```"}}