diff options
Diffstat (limited to 'tests/lib/mocha-3.1.0/test/color.spec.js')
-rw-r--r-- | tests/lib/mocha-3.1.0/test/color.spec.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.0/test/color.spec.js b/tests/lib/mocha-3.1.0/test/color.spec.js new file mode 100644 index 0000000000..5ee46e71c4 --- /dev/null +++ b/tests/lib/mocha-3.1.0/test/color.spec.js @@ -0,0 +1,18 @@ +var assert = require('assert'); +var child_process = 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']; + child_process.execFile(process.execPath, command, function(err, stdout, stderr) { + if (err) return cb(err); + + assert(stdout.indexOf('[90m') === -1); + + cb(null); + }); + }); +}); |