From af10705632bc1f8203ea50ea7ed3120b01c67122 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Mon, 20 Jul 2020 01:43:47 -0400 Subject: [PATCH] Add testcases for setLogLevel (#947). --- packages/tests/src.ts/test-utils.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/tests/src.ts/test-utils.ts b/packages/tests/src.ts/test-utils.ts index 2e6f9a18a..46ce6817c 100644 --- a/packages/tests/src.ts/test-utils.ts +++ b/packages/tests/src.ts/test-utils.ts @@ -626,6 +626,17 @@ describe("BigNumber", function() { describe("Logger", function() { const logger = new ethers.utils.Logger("testing/0.0"); + it ("setLogLevel", function() { + ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.DEBUG); + ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.INFO); + ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.WARNING); + ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.ERROR); + ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.OFF); + + // Reset back to INFO when done tests + ethers.utils.Logger.setLogLevel(ethers.utils.Logger.levels.INFO); + }); + it("checkArgumentCount", function() { logger.checkArgumentCount(3, 3); }); @@ -647,6 +658,7 @@ describe("Logger", function() { }); }); + /* describe("Base58 Coder", function() { it("decodes", function() {