1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 00:29:09 -05:00

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

Original: 90871cfca6
This commit is contained in:
Vincent LE GOFF 2019-03-02 20:56:53 +01:00 committed by Ryan Dahl
parent c131b8f3b6
commit ef30a88542

View file

@ -1,6 +1,6 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. // 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 { interface Constructor {
new (...args: any[]): any; 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() { function red_failed() {
return FG_RED + "FAILED" + RESET; return red("FAILED");
} }
function green_ok() { function green_ok() {
return FG_GREEN + "ok" + RESET; return green("ok");
} }
export async function runTests() { export async function runTests() {