From 6373e8c0d6234a3cd439e491d9e16827cff5811b Mon Sep 17 00:00:00 2001 From: Niccolo Zapponi Date: Thu, 18 Jan 2024 23:56:10 +0000 Subject: [PATCH] Fixed tests --- tests/devid.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/devid.test.ts b/tests/devid.test.ts index d03948a..b3f292d 100644 --- a/tests/devid.test.ts +++ b/tests/devid.test.ts @@ -1,4 +1,4 @@ -import { ChecksumError, FormatError } from "../src/errors"; +import { DevIDError } from "../src/errors"; import devid, { DevID, setDelimiter } from "../src/devid"; describe("devid creation", () => { @@ -27,7 +27,7 @@ describe("devid creation", () => { it("should fail to create a devid if the prefix is too long", () => { expect(() => { devid("1234567890123456789012345"); - }).toThrow(FormatError); + }).toThrow(DevIDError); }); }); @@ -60,7 +60,7 @@ describe("devid parsing", () => { it("should fail to initialize a devid if there are invalid characters", () => { expect(() => { devid("12345678901234567890123."); - }).toThrow(FormatError); + }).toThrow(DevIDError); }); it("should fail to initialize a devid if it was tampered with", () => { @@ -68,6 +68,6 @@ describe("devid parsing", () => { id[0] = id[0] === "1" ? "2" : "1"; expect(() => { devid(id.join("")); - }).toThrow(ChecksumError); + }).toThrow(DevIDError); }); }); \ No newline at end of file