aboutsummaryrefslogtreecommitdiff
path: root/test/unit/repository.unit.test.ts
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-08-14 22:28:17 +0200
committerHampusM <hampus@hampusmat.com>2021-08-14 22:28:17 +0200
commitddcf71225226bc0929d5c6d609b13ff0489e5b94 (patch)
tree7f788d29af4441e27d709aaec1359e205871a11b /test/unit/repository.unit.test.ts
parent81b39ee7848b0fbdcd8b61a04077a58c23580dd1 (diff)
Revamped backend error handling & improved imports in tests
Diffstat (limited to 'test/unit/repository.unit.test.ts')
-rw-r--r--test/unit/repository.unit.test.ts6
1 files changed, 3 insertions, 3 deletions
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() => {