From c65d0c63e78ba3b50bf1260e40d999e35fda8d05 Mon Sep 17 00:00:00 2001 From: Yusuke Sakurai Date: Fri, 28 Feb 2020 05:12:04 +0900 Subject: reduce unnecessary output on tests (#4148) --- std/examples/colors.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'std/examples') diff --git a/std/examples/colors.ts b/std/examples/colors.ts index e02c90746..c4cab7e78 100644 --- a/std/examples/colors.ts +++ b/std/examples/colors.ts @@ -1,4 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { bgBlue, red, bold, italic } from "../fmt/colors.ts"; -console.log(bgBlue(italic(red(bold("Hello world!"))))); +if (import.meta.main) { + console.log(bgBlue(italic(red(bold("Hello world!"))))); +} -- cgit v1.2.3