diff options
Diffstat (limited to 'tests/lib/mocha-3.1.2/test/color.spec.js')
-rw-r--r-- | tests/lib/mocha-3.1.2/test/color.spec.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.2/test/color.spec.js b/tests/lib/mocha-3.1.2/test/color.spec.js new file mode 100644 index 0000000000..bffd30e6eb --- /dev/null +++ b/tests/lib/mocha-3.1.2/test/color.spec.js @@ -0,0 +1,20 @@ +'use strict'; + +var assert = require('assert'); +var childProcess = require('child_process'); +var path = require('path'); + +describe('Mocha', function () { + this.timeout(2000); + + it('should not output colors to pipe', function (cb) { + var command = [path.join('bin', 'mocha'), '--grep', 'missing-test']; + childProcess.execFile(process.execPath, command, function (err, stdout, stderr) { + if (err) return cb(err); + + assert(stdout.indexOf('[90m') === -1); + + cb(null); + }); + }); +}); |