From 9866cad8621765e76594bf30900888b8d0661d1f Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Thu, 7 Dec 2023 12:16:58 +0100 Subject: [PATCH] Add test case for empty address string --- core/test/helpers.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/test/helpers.test.ts b/core/test/helpers.test.ts index bb5641643..c5a507eb8 100644 --- a/core/test/helpers.test.ts +++ b/core/test/helpers.test.ts @@ -29,6 +29,12 @@ describe("Helpers", () => { expect(isNonZeroAddress(ADDRESS_ZERO)).to.be.false }) + it("should throw an error for empty string", () => { + expect(() => { + isNonZeroAddress("") + }).to.throw("invalid address") + }) + it("should throw an error for address containing invalid character", () => { expect(() => { isNonZeroAddress(ADDRESS_INVALID)