Skip to content
Permalink
Browse files

Testing add ansi color support from color module (denoland#223)

  • Loading branch information...
zekth authored and ry committed Mar 2, 2019
1 parent 0c3ba83 commit 90871cfca6f44a8cfea19345998359d615002b05
Showing with 3 additions and 7 deletions.
  1. +3 −7 testing/mod.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.

// Do not add imports in this file in order to be compatible with Node.
import { green, red } from "../colors/mod.ts";

interface Constructor {
new (...args: any[]): any;
@@ -233,16 +233,12 @@ function filter(name: string): boolean {
}
}

const RESET = "\x1b[0m";
const FG_RED = "\x1b[31m";
const FG_GREEN = "\x1b[32m";

function red_failed() {
return FG_RED + "FAILED" + RESET;
return red("FAILED");
}

function green_ok() {
return FG_GREEN + "ok" + RESET;
return green("ok");
}

export async function runTests() {

0 comments on commit 90871cf

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.