Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Make test output color with --test (#2083)
Browse files Browse the repository at this point in the history
  • Loading branch information
nchen63 authored Jan 20, 2017
1 parent 2aba847 commit 23f5f00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export interface TestResult {
}

export function runTest(testDirectory: string, rulesDirectory?: string | string[]): TestResult {
// needed to get colors to show up when passing through Grunt
(colors as any).enabled = true;

const filesToLint = glob.sync(path.join(testDirectory, `**/*${MARKUP_FILE_EXTENSION}`));
const tslintConfig = Linter.findConfiguration(path.join(testDirectory, "tslint.json"), "").results;
const tsConfig = path.join(testDirectory, "tsconfig.json");
Expand Down
3 changes: 0 additions & 3 deletions test/ruleTestRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ import * as path from "path";

import {consoleTestResultHandler, runTest} from "../src/test";

// needed to get colors to show up when passing through Grunt
(colors as any).enabled = true;

/* tslint:disable:no-console */
console.log();
console.log(colors.underline("Testing Lint Rules:"));
Expand Down

0 comments on commit 23f5f00

Please sign in to comment.