import { assertEqual, test } from "../testing/mod.ts"; import { color } from "./mod.ts"; import "./example.ts"; test(function singleColor() { assertEqual(color.red("Hello world"), "Hello world"); }); test(function doubleColor() { assertEqual(color.red.bgBlue("Hello world"), "Hello world"); }); test(function newLinesContinueColors() { assertEqual(color.red("Hello\nworld"), "Hello\nworld"); assertEqual(color.red("Hello\r\nworld"), "Hello\r\nworld"); assertEqual(color.red("Hello\n\nworld"), "Hello\n\nworld"); }); test(function replacesCloseCharacters() { assertEqual(color.red("Hello"), "Hello"); });