diff options
| author | Vincent LE GOFF <g_n_s@hotmail.fr> | 2019-03-06 22:39:50 +0100 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-06 16:39:50 -0500 |
| commit | e36edfdb3fd4709358a5f499f13cfe3d53c2b4f7 (patch) | |
| tree | 1baef3f876a5e75288c3ec9056cdb93dd6b5787f /colors | |
| parent | d29957ad17956016c35a04f5f1f98565e58e8a2e (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.ts | 15 |
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"), "[31mHello world[39m"); + assertEq(red("Hello world"), "[31mHello world[39m"); }); test(function doubleColor() { - assert.equal(bgBlue(red("Hello world")), "[44m[31mHello world[39m[49m"); + assertEq(bgBlue(red("Hello world")), "[44m[31mHello world[39m[49m"); }); test(function replacesCloseCharacters() { - assert.equal(red("Hel[39mlo"), "[31mHel[31mlo[39m"); + assertEq(red("Hel[39mlo"), "[31mHel[31mlo[39m"); }); 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"), "[31mHello world[39m"); + assertEq(red("Hello world"), "[31mHello world[39m"); }); |
