{"action":"created","issue":{"url":"https://api.github.com/repos/mochajs/mocha/issues/1582","labels_url":"https://api.github.com/repos/mochajs/mocha/issues/1582/labels{/name}","comments_url":"https://api.github.com/repos/mochajs/mocha/issues/1582/comments","events_url":"https://api.github.com/repos/mochajs/mocha/issues/1582/events","html_url":"https://github.com/mochajs/mocha/issues/1582","id":60196541,"number":1582,"title":"get the default `process.stdout.write` back after tests are finished","user":{"login":"stevemao","id":6316590,"avatar_url":"https://avatars.githubusercontent.com/u/6316590?v=3","gravatar_id":"","url":"https://api.github.com/users/stevemao","html_url":"https://github.com/stevemao","followers_url":"https://api.github.com/users/stevemao/followers","following_url":"https://api.github.com/users/stevemao/following{/other_user}","gists_url":"https://api.github.com/users/stevemao/gists{/gist_id}","starred_url":"https://api.github.com/users/stevemao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevemao/subscriptions","organizations_url":"https://api.github.com/users/stevemao/orgs","repos_url":"https://api.github.com/users/stevemao/repos","events_url":"https://api.github.com/users/stevemao/events{/privacy}","received_events_url":"https://api.github.com/users/stevemao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2015-03-07T07:59:50Z","updated_at":"2015-03-29T21:27:35Z","closed_at":"2015-03-29T21:27:35Z","body":"I have a test which tests stdout so I need to change the default behaviour of `process.stdout`. \r\n\r\n```js\r\nprocess.stdout.write = (function(write) {\r\n    return function(string, encoding, fd) {\r\n      var args = _.toArray(arguments);\r\n      callback.call(callback, string);\r\n    };\r\n  }(process.stdout.write));\r\n```\r\n\r\nmocha's report, however, cannot be seen any more if I use this. It would be good if mocha remembers the default `process.stdout.write` at the beginning and change it back after tests are finished."},"comment":{"url":"https://api.github.com/repos/mochajs/mocha/issues/comments/87484123","html_url":"https://github.com/mochajs/mocha/issues/1582#issuecomment-87484123","issue_url":"https://api.github.com/repos/mochajs/mocha/issues/1582","id":87484123,"user":{"login":"travisjeffery","id":15225,"avatar_url":"https://avatars.githubusercontent.com/u/15225?v=3","gravatar_id":"","url":"https://api.github.com/users/travisjeffery","html_url":"https://github.com/travisjeffery","followers_url":"https://api.github.com/users/travisjeffery/followers","following_url":"https://api.github.com/users/travisjeffery/following{/other_user}","gists_url":"https://api.github.com/users/travisjeffery/gists{/gist_id}","starred_url":"https://api.github.com/users/travisjeffery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisjeffery/subscriptions","organizations_url":"https://api.github.com/users/travisjeffery/orgs","repos_url":"https://api.github.com/users/travisjeffery/repos","events_url":"https://api.github.com/users/travisjeffery/events{/privacy}","received_events_url":"https://api.github.com/users/travisjeffery/received_events","type":"User","site_admin":false},"created_at":"2015-03-29T21:27:35Z","updated_at":"2015-03-29T21:27:35Z","body":"yeah closing, adding this will just lead to more pain and needing more configuration. "}}