File: color.spec.js

package info (click to toggle)
node-mocha 4.1.0%2Bds3-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,956 kB
  • sloc: makefile: 163; sh: 17
file content (20 lines) | stat: -rw-r--r-- 504 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict';

var assert = require('assert');
var childProcess = require('child_process');
var path = require('path');

describe('Mocha', function () {
  this.timeout(8000);

  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);
    });
  });
});