summaryrefslogtreecommitdiff
path: root/std/log/mod_test.ts
diff options
context:
space:
mode:
authorMarcos Casagrande <marcoscvp90@gmail.com>2020-05-20 16:27:01 +0200
committerGitHub <noreply@github.com>2020-05-20 16:27:01 +0200
commit7566aa8765be82a9773b7ff83c3ddc8e70041e79 (patch)
tree48b06031b5fc83bb6b4e680747c6d07d767baaa6 /std/log/mod_test.ts
parent8799855fdc97960b18fbbb3450ed132e352607c4 (diff)
fix(std/log): await default logger setup (#5341)
Diffstat (limited to 'std/log/mod_test.ts')
-rw-r--r--std/log/mod_test.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/std/log/mod_test.ts b/std/log/mod_test.ts
new file mode 100644
index 000000000..ceedcc858
--- /dev/null
+++ b/std/log/mod_test.ts
@@ -0,0 +1,16 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+const { test } = Deno;
+import { Logger } from "./logger.ts";
+import { assert } from "../testing/asserts.ts";
+import { getLogger } from "./mod.ts";
+
+let logger: Logger | null = null;
+try {
+ // Need to initialize it here
+ // otherwise it will be already initialized on Deno.test
+ logger = getLogger();
+} catch {}
+
+test("logger is initialized", function (): void {
+ assert(logger instanceof Logger);
+});