Permalink
Browse files

Don't assume the test is running in a tty

  • Loading branch information...
1 parent fb7cfd6 commit ea06d611549f8a09f172a774a4dbd8f75fcabc7b @creationix committed Oct 22, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 test.js
View
@@ -34,7 +34,10 @@ for (var i = 0, l = tests.length; i < l; i++) {
tests.push(obj);
});
-var width = process.stdout.getWindowSize()[0];
+var width = 80;
+if (process.stdout.isTTY) {
+ width = process.stdout.getWindowSize()[0];
+}
var mistakes = 0;
function dump(value) {
if (typeof value === 'undefined' || Buffer.isBuffer(value)) {

0 comments on commit ea06d61

Please sign in to comment.