summaryrefslogtreecommitdiff
path: root/colors
diff options
context:
space:
mode:
authorVincent LE GOFF <g_n_s@hotmail.fr>2019-03-06 22:39:50 +0100
committerRyan Dahl <ry@tinyclouds.org>2019-03-06 16:39:50 -0500
commite36edfdb3fd4709358a5f499f13cfe3d53c2b4f7 (patch)
tree1baef3f876a5e75288c3ec9056cdb93dd6b5787f /colors
parentd29957ad17956016c35a04f5f1f98565e58e8a2e (diff)
Testing refactor (denoland/deno_std#240)
Original: https://github.com/denoland/deno_std/commit/e1d5c00279132aa639030c6c6d9b4e308bd4775e
Diffstat (limited to 'colors')
-rw-r--r--colors/test.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/colors/test.ts b/colors/test.ts
index bfe8bc4f5..b541580d2 100644
--- a/colors/test.ts
+++ b/colors/test.ts
@@ -1,24 +1,25 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
-import { assert, test } from "../testing/mod.ts";
+import { test } from "../testing/mod.ts";
+import { assertEq } from "../testing/asserts.ts";
import { red, bgBlue, setEnabled, getEnabled } from "./mod.ts";
import "./example.ts";
test(function singleColor() {
- assert.equal(red("Hello world"), "Hello world");
+ assertEq(red("Hello world"), "Hello world");
});
test(function doubleColor() {
- assert.equal(bgBlue(red("Hello world")), "Hello world");
+ assertEq(bgBlue(red("Hello world")), "Hello world");
});
test(function replacesCloseCharacters() {
- assert.equal(red("Hello"), "Hello");
+ assertEq(red("Hello"), "Hello");
});
test(function enablingColors() {
- assert.equal(getEnabled(), true);
+ assertEq(getEnabled(), true);
setEnabled(false);
- assert.equal(bgBlue(red("Hello world")), "Hello world");
+ assertEq(bgBlue(red("Hello world")), "Hello world");
setEnabled(true);
- assert.equal(red("Hello world"), "Hello world");
+ assertEq(red("Hello world"), "Hello world");
});