summaryrefslogtreecommitdiff
path: root/std/fmt/colors_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-11 17:24:27 +0100
committerGitHub <noreply@github.com>2020-02-11 17:24:27 +0100
commit61273085e40fb4d992eef4b1b5601e3567c80664 (patch)
tree1ac0f401d4cb897bdb6f88e3a5c47fece2856f89 /std/fmt/colors_test.ts
parente0bcecee6042b219c6626172851af5a25362b948 (diff)
refactor: rewrite tests in std/ to use Deno.test (#3930)
Diffstat (limited to 'std/fmt/colors_test.ts')
-rw-r--r--std/fmt/colors_test.ts57
1 files changed, 28 insertions, 29 deletions
diff --git a/std/fmt/colors_test.ts b/std/fmt/colors_test.ts
index 6113bd22f..9d221dc8b 100644
--- a/std/fmt/colors_test.ts
+++ b/std/fmt/colors_test.ts
@@ -1,22 +1,21 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-import { test } from "../testing/mod.ts";
import { assertEquals } from "../testing/asserts.ts";
import * as c from "./colors.ts";
import "../examples/colors.ts";
-test(function singleColor(): void {
+Deno.test(function singleColor(): void {
assertEquals(c.red("foo bar"), "foo bar");
});
-test(function doubleColor(): void {
+Deno.test(function doubleColor(): void {
assertEquals(c.bgBlue(c.red("foo bar")), "foo bar");
});
-test(function replacesCloseCharacters(): void {
+Deno.test(function replacesCloseCharacters(): void {
assertEquals(c.red("Hello"), "Hello");
});
-test(function enablingColors(): void {
+Deno.test(function enablingColors(): void {
assertEquals(c.getColorEnabled(), true);
c.setColorEnabled(false);
assertEquals(c.bgBlue(c.red("foo bar")), "foo bar");
@@ -24,98 +23,98 @@ test(function enablingColors(): void {
assertEquals(c.red("foo bar"), "foo bar");
});
-test(function testBold(): void {
+Deno.test(function testBold(): void {
assertEquals(c.bold("foo bar"), "foo bar");
});
-test(function testDim(): void {
+Deno.test(function testDim(): void {
assertEquals(c.dim("foo bar"), "foo bar");
});
-test(function testItalic(): void {
+Deno.test(function testItalic(): void {
assertEquals(c.italic("foo bar"), "foo bar");
});
-test(function testUnderline(): void {
+Deno.test(function testUnderline(): void {
assertEquals(c.underline("foo bar"), "foo bar");
});
-test(function testInverse(): void {
+Deno.test(function testInverse(): void {
assertEquals(c.inverse("foo bar"), "foo bar");
});
-test(function testHidden(): void {
+Deno.test(function testHidden(): void {
assertEquals(c.hidden("foo bar"), "foo bar");
});
-test(function testStrikethrough(): void {
+Deno.test(function testStrikethrough(): void {
assertEquals(c.strikethrough("foo bar"), "foo bar");
});
-test(function testBlack(): void {
+Deno.test(function testBlack(): void {
assertEquals(c.black("foo bar"), "foo bar");
});
-test(function testRed(): void {
+Deno.test(function testRed(): void {
assertEquals(c.red("foo bar"), "foo bar");
});
-test(function testGreen(): void {
+Deno.test(function testGreen(): void {
assertEquals(c.green("foo bar"), "foo bar");
});
-test(function testYellow(): void {
+Deno.test(function testYellow(): void {
assertEquals(c.yellow("foo bar"), "foo bar");
});
-test(function testBlue(): void {
+Deno.test(function testBlue(): void {
assertEquals(c.blue("foo bar"), "foo bar");
});
-test(function testMagenta(): void {
+Deno.test(function testMagenta(): void {
assertEquals(c.magenta("foo bar"), "foo bar");
});
-test(function testCyan(): void {
+Deno.test(function testCyan(): void {
assertEquals(c.cyan("foo bar"), "foo bar");
});
-test(function testWhite(): void {
+Deno.test(function testWhite(): void {
assertEquals(c.white("foo bar"), "foo bar");
});
-test(function testGray(): void {
+Deno.test(function testGray(): void {
assertEquals(c.gray("foo bar"), "foo bar");
});
-test(function testBgBlack(): void {
+Deno.test(function testBgBlack(): void {
assertEquals(c.bgBlack("foo bar"), "foo bar");
});
-test(function testBgRed(): void {
+Deno.test(function testBgRed(): void {
assertEquals(c.bgRed("foo bar"), "foo bar");
});
-test(function testBgGreen(): void {
+Deno.test(function testBgGreen(): void {
assertEquals(c.bgGreen("foo bar"), "foo bar");
});
-test(function testBgYellow(): void {
+Deno.test(function testBgYellow(): void {
assertEquals(c.bgYellow("foo bar"), "foo bar");
});
-test(function testBgBlue(): void {
+Deno.test(function testBgBlue(): void {
assertEquals(c.bgBlue("foo bar"), "foo bar");
});
-test(function testBgMagenta(): void {
+Deno.test(function testBgMagenta(): void {
assertEquals(c.bgMagenta("foo bar"), "foo bar");
});
-test(function testBgCyan(): void {
+Deno.test(function testBgCyan(): void {
assertEquals(c.bgCyan("foo bar"), "foo bar");
});
-test(function testBgWhite(): void {
+Deno.test(function testBgWhite(): void {
assertEquals(c.bgWhite("foo bar"), "foo bar");
});