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/misc.unit.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/unit/misc.unit.test.ts') diff --git a/test/unit/misc.unit.test.ts b/test/unit/misc.unit.test.ts index 38c69fd..d3d793a 100644 --- a/test/unit/misc.unit.test.ts +++ b/test/unit/misc.unit.test.ts @@ -1,5 +1,5 @@ import { findAsync, getDirectory, getFile } from "server/src/git/misc"; -import { BaseError } from "server/src/git/error"; +import { ServerError } from "server/src/git/error"; import { EnvironmentVariables } from "../util"; const env = process.env as EnvironmentVariables; @@ -53,7 +53,7 @@ describe("Miscellaneous functions", () => { it("Should fail to return the content of a nonexistent file in a bare repository", async() => { expect.assertions(1); - await expect(getFile(env.GIT_DIR, env.AVAIL_REPO, "myselfasteem")).rejects.toBeInstanceOf(BaseError); + await expect(getFile(env.GIT_DIR, env.AVAIL_REPO, "myselfasteem")).rejects.toBeInstanceOf(ServerError); }); }); @@ -71,7 +71,7 @@ describe("Miscellaneous functions", () => { it("Should fail to return the content of a nonexistent directory", async() => { expect.assertions(1); - await expect(getDirectory(`${env.GIT_DIR}/${env.AVAIL_REPO}/something`)).rejects.toBeInstanceOf(BaseError); + await expect(getDirectory(`${env.GIT_DIR}/${env.AVAIL_REPO}/something`)).rejects.toBeInstanceOf(ServerError); }); }); }); \ No newline at end of file -- cgit v1.2.3-18-g5258