Skip to content

Commit

Permalink
Add testcases for setLogLevel (#947).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jul 20, 2020
1 parent 5443363 commit af10705
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/tests/src.ts/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -647,6 +658,7 @@ describe("Logger", function() {
});
});


/*
describe("Base58 Coder", function() {
it("decodes", function() {
Expand Down

0 comments on commit af10705

Please sign in to comment.