Add testcases for setLogLevel (#947).

This commit is contained in:
Richard Moore 2020-07-20 01:43:47 -04:00
parent 5443363de4
commit af10705632
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

@ -626,6 +626,17 @@ describe("BigNumber", function() {
describe("Logger", function() { describe("Logger", function() {
const logger = new ethers.utils.Logger("testing/0.0"); 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() { it("checkArgumentCount", function() {
logger.checkArgumentCount(3, 3); logger.checkArgumentCount(3, 3);
}); });
@ -647,6 +658,7 @@ describe("Logger", function() {
}); });
}); });
/* /*
describe("Base58 Coder", function() { describe("Base58 Coder", function() {
it("decodes", function() { it("decodes", function() {