visionmedia/mocha — Issue #273: tty.getWindowSize() throwing Error: ENODEV, Operation not supported by device
Author: leisms
Created: 2012-02-20 07:13:49+00:00
State: open

I'm trying to run Mocha through a git pre-commit, spawned by make.

Running the pre-commit script manually works, but when I try to make a commit, and git runs the pre-commit I get the following error:

```javascript
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: ENODEV, Operation not supported by device
at Object. (...node_modules/mocha/lib/reporters/base.js:75:13)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at require (module.js:348:19)
at Object. (...node_modules/mocha/lib/reporters/index.js:2:16)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
make: *** [test] Error 1
```
I need to set the width manually on line 71 of mocha/lib/reporters/base.js in order for the pre-commit to run:

```javascript
exports.window = {
width: 75
};
```