mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 08:09:08 -05:00
Testing add ansi color support from color module (denoland/deno_std#223)
Original: 90871cfca6
This commit is contained in:
parent
c131b8f3b6
commit
ef30a88542
1 changed files with 3 additions and 7 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue