// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import { assert, test } from "../testing/mod.ts"; import { red, bgBlue, setEnabled, getEnabled } from "./mod.ts"; import "./example.ts"; test(function singleColor() { assert.equal(red("Hello world"), "Hello world"); }); test(function doubleColor() { assert.equal(bgBlue(red("Hello world")), "Hello world"); }); test(function replacesCloseCharacters() { assert.equal(red("Hello"), "Hello"); }); test(function enablingColors() { assert.equal(getEnabled(), true); setEnabled(false); assert.equal(bgBlue(red("Hello world")), "Hello world"); setEnabled(true); assert.equal(red("Hello world"), "Hello world"); });