summaryrefslogtreecommitdiff
path: root/colors/test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'colors/test.ts')
-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");
});