diff options
author | HampusM <hampus@hampusmat.com> | 2021-08-14 22:28:17 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-08-14 22:28:17 +0200 |
commit | ddcf71225226bc0929d5c6d609b13ff0489e5b94 (patch) | |
tree | 7f788d29af4441e27d709aaec1359e205871a11b /test/unit/misc.unit.test.ts | |
parent | 81b39ee7848b0fbdcd8b61a04077a58c23580dd1 (diff) |
Revamped backend error handling & improved imports in tests
Diffstat (limited to 'test/unit/misc.unit.test.ts')
-rw-r--r-- | test/unit/misc.unit.test.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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 |