From 662eb8f8c981565950d35cdd1c9ca6a67eaef8f2 Mon Sep 17 00:00:00 2001 From: Oliver Lenehan Date: Thu, 21 May 2020 00:29:59 +1000 Subject: feat(std/fmt): rgb24 and bgRgb24 can use numbers for color (#5198) --- std/fmt/colors_test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'std/fmt/colors_test.ts') diff --git a/std/fmt/colors_test.ts b/std/fmt/colors_test.ts index cfa189d30..7a312202a 100644 --- a/std/fmt/colors_test.ts +++ b/std/fmt/colors_test.ts @@ -146,6 +146,10 @@ Deno.test("test_rgb24", function (): void { ); }); +Deno.test("test_rgb24number", function (): void { + assertEquals(c.rgb24("foo bar", 0x070809), "foo bar"); +}); + Deno.test("test_bgRgb24", function (): void { assertEquals( c.bgRgb24("foo bar", { @@ -156,3 +160,7 @@ Deno.test("test_bgRgb24", function (): void { "foo bar" ); }); + +Deno.test("test_bgRgb24number", function (): void { + assertEquals(c.bgRgb24("foo bar", 0x070809), "foo bar"); +}); -- cgit v1.2.3