Skip to content

Commit

Permalink
Chore: fix formatters/table test (#11534)
Browse files Browse the repository at this point in the history
If standalone mocha command ran it, coloring caused to fail the tests.
  • Loading branch information
mysticatea authored and aladdin-add committed Mar 22, 2019
1 parent 78358a8 commit f16af43
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/lib/formatters/table.js
Expand Up @@ -8,14 +8,26 @@
// Requirements
//------------------------------------------------------------------------------

const assert = require("chai").assert,
formatter = require("../../../lib/formatters/table");
const assert = require("chai").assert;
const chalk = require("chalk");
const formatter = require("../../../lib/formatters/table");

//------------------------------------------------------------------------------
// Tests
//------------------------------------------------------------------------------

describe("formatter:table", () => {
let originalChalkEnabled;

before(() => {
originalChalkEnabled = chalk.enabled;
chalk.enabled = false;
});

after(() => {
chalk.enabled = originalChalkEnabled;
});

describe("when passed no messages", () => {
const code = [
{
Expand Down

0 comments on commit f16af43

Please sign in to comment.