From ddcf71225226bc0929d5c6d609b13ff0489e5b94 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 14 Aug 2021 22:28:17 +0200 Subject: Revamped backend error handling & improved imports in tests --- test/unit/repository.unit.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/unit/repository.unit.test.ts') diff --git a/test/unit/repository.unit.test.ts b/test/unit/repository.unit.test.ts index b3d9a2d..752cd59 100644 --- a/test/unit/repository.unit.test.ts +++ b/test/unit/repository.unit.test.ts @@ -4,7 +4,7 @@ import { Tree } from "server/src/git/tree"; import { Branch } from "server/src/git/branch"; import { Tag } from "server/src/git/tag"; import { EnvironmentVariables, expectCommitProperties } from "../util"; -import { BaseError } from "server/src/git/error"; +import { ServerError } from "server/src/git/error"; const env = process.env as EnvironmentVariables; @@ -33,13 +33,13 @@ describe("Repository", () => { it("Should fail to open a nonexistant repository", async() => { expect.assertions(1); - await expect(Repository.open(env.GIT_DIR, env.UNAVAIL_REPO)).rejects.toBeInstanceOf(BaseError); + await expect(Repository.open(env.GIT_DIR, env.UNAVAIL_REPO)).rejects.toBeInstanceOf(ServerError); }); it("Should fail to open a repository with a nonexistant branch", async() => { expect.assertions(1); - await expect(Repository.open(env.GIT_DIR, env.AVAIL_REPO, "wubbalubbadubdub")).rejects.toBeInstanceOf(BaseError); + await expect(Repository.open(env.GIT_DIR, env.AVAIL_REPO, "wubbalubbadubdub")).rejects.toBeInstanceOf(ServerError); }); it("Should open all repositories", async() => { -- cgit v1.2.3-18-g5258