From ef30a885424fffcc20af9529265474d0203a9533 Mon Sep 17 00:00:00 2001 From: Vincent LE GOFF Date: Sat, 2 Mar 2019 20:56:53 +0100 Subject: Testing add ansi color support from color module (denoland/deno_std#223) Original: https://github.com/denoland/deno_std/commit/90871cfca6f44a8cfea19345998359d615002b05 --- testing/mod.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'testing/mod.ts') diff --git a/testing/mod.ts b/testing/mod.ts index 0a6e52805..30f2a0c98 100644 --- a/testing/mod.ts +++ b/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() { -- cgit v1.2.3