{"action":"created","issue":{"url":"https://api.github.com/repos/cbrand/gulp-protobufjs/issues/3","labels_url":"https://api.github.com/repos/cbrand/gulp-protobufjs/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/cbrand/gulp-protobufjs/issues/3/comments","events_url":"https://api.github.com/repos/cbrand/gulp-protobufjs/issues/3/events","html_url":"https://github.com/cbrand/gulp-protobufjs/issues/3","id":122461628,"number":3,"title":"Error reporting failure in unit tests","user":{"login":"jbq","id":57103,"avatar_url":"https://avatars.githubusercontent.com/u/57103?v=3","gravatar_id":"","url":"https://api.github.com/users/jbq","html_url":"https://github.com/jbq","followers_url":"https://api.github.com/users/jbq/followers","following_url":"https://api.github.com/users/jbq/following{/other_user}","gists_url":"https://api.github.com/users/jbq/gists{/gist_id}","starred_url":"https://api.github.com/users/jbq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbq/subscriptions","organizations_url":"https://api.github.com/users/jbq/orgs","repos_url":"https://api.github.com/users/jbq/repos","events_url":"https://api.github.com/users/jbq/events{/privacy}","received_events_url":"https://api.github.com/users/jbq/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-16T09:25:45Z","updated_at":"2015-12-28T12:25:49Z","closed_at":"2015-12-16T13:34:57Z","body":"I wrote a unit test in `indexSpec.js` to reproduce an issue I'm having.  When this test fails, instead of reporting a pretty error message, I'm getting the following failure:\r\n\r\n```\r\n  37 passing (69ms)\r\n  1 failing\r\n\r\n  1) index should be able to propagate syntax:\r\n     Error: no writecb in Transform class\r\n      at afterTransform (node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:95:33)\r\n      at TransformState.afterTransform (node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)\r\n      at index.js:75:13\r\n      at _rejected (node_modules/q/q.js:844:24)\r\n      at node_modules/q/q.js:870:30\r\n      at Promise.when (node_modules/q/q.js:1122:31)\r\n      at Promise.promise.promiseDispatch (node_modules/q/q.js:788:41)\r\n      at node_modules/q/q.js:604:44\r\n      at runSingle (node_modules/q/q.js:137:13)\r\n      at flush (node_modules/q/q.js:125:13)\r\n\r\n\r\n\r\nnpm ERR! Test failed.  See above for more details.\r\n```\r\n\r\nI'm using npm 2.4.17 and node v4.2.1.  I tried various tweaks in `index.js` in the `catch` block to no avail.\r\n\r\nCan you please help?  Thanks!"},"comment":{"url":"https://api.github.com/repos/cbrand/gulp-protobufjs/issues/comments/167559923","html_url":"https://github.com/cbrand/gulp-protobufjs/issues/3#issuecomment-167559923","issue_url":"https://api.github.com/repos/cbrand/gulp-protobufjs/issues/3","id":167559923,"user":{"login":"cbrand","id":2278288,"avatar_url":"https://avatars.githubusercontent.com/u/2278288?v=3","gravatar_id":"","url":"https://api.github.com/users/cbrand","html_url":"https://github.com/cbrand","followers_url":"https://api.github.com/users/cbrand/followers","following_url":"https://api.github.com/users/cbrand/following{/other_user}","gists_url":"https://api.github.com/users/cbrand/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrand/subscriptions","organizations_url":"https://api.github.com/users/cbrand/orgs","repos_url":"https://api.github.com/users/cbrand/repos","events_url":"https://api.github.com/users/cbrand/events{/privacy}","received_events_url":"https://api.github.com/users/cbrand/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T12:25:49Z","updated_at":"2015-12-28T12:25:49Z","body":"I just had the chance to look into it.\r\n\r\nSeems like I've done the error handling wrong and the error was seen as the legitimate return of the function.\r\n\r\nGit-Commit https://github.com/cbrand/gulp-protobufjs/commit/390a4f1fa3cab6351d05de4feea945686f7b896d fixes that and you should be able to see the correct error when running the tests."}}