diff options
author | HampusM <hampus@hampusmat.com> | 2021-08-12 15:37:30 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-08-12 15:37:30 +0200 |
commit | d41b27f43335cfb1a8ff49aeb121f992332429cf (patch) | |
tree | 93b6e1ec9b292c3d80ee1a538d0e729612148052 /test/unit/repository.unit.test.ts | |
parent | 30f0b2ee1f494be1786280040fb47ec18bde8a6d (diff) |
Cleaned up the settings implementation & renamed base_dir project-wide to git_dir
Diffstat (limited to 'test/unit/repository.unit.test.ts')
-rw-r--r-- | test/unit/repository.unit.test.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/repository.unit.test.ts b/test/unit/repository.unit.test.ts index 66e32d4..b3d9a2d 100644 --- a/test/unit/repository.unit.test.ts +++ b/test/unit/repository.unit.test.ts @@ -9,7 +9,7 @@ import { BaseError } from "server/src/git/error"; const env = process.env as EnvironmentVariables; function expectRepositoryProperties(repository: Repository) { - expect(repository).toHaveProperty("base_dir"); + expect(repository).toHaveProperty("git_dir"); expect(repository).toHaveProperty("description"); expect(repository).toHaveProperty("name"); expect(repository).toHaveProperty("name.full"); @@ -22,7 +22,7 @@ describe("Repository", () => { it("Should open a repository", async() => { expect.assertions(8); - const repository = await Repository.open(env.BASE_DIR, env.AVAIL_REPO); + const repository = await Repository.open(env.GIT_DIR, env.AVAIL_REPO); expect(repository).toBeDefined(); expect(repository).toBeInstanceOf(Repository); @@ -33,19 +33,19 @@ describe("Repository", () => { it("Should fail to open a nonexistant repository", async() => { expect.assertions(1); - await expect(Repository.open(env.BASE_DIR, env.UNAVAIL_REPO)).rejects.toBeInstanceOf(BaseError); + await expect(Repository.open(env.GIT_DIR, env.UNAVAIL_REPO)).rejects.toBeInstanceOf(BaseError); }); it("Should fail to open a repository with a nonexistant branch", async() => { expect.assertions(1); - await expect(Repository.open(env.BASE_DIR, env.AVAIL_REPO, "wubbalubbadubdub")).rejects.toBeInstanceOf(BaseError); + await expect(Repository.open(env.GIT_DIR, env.AVAIL_REPO, "wubbalubbadubdub")).rejects.toBeInstanceOf(BaseError); }); it("Should open all repositories", async() => { expect.hasAssertions(); - const all_repositories = await Repository.openAll(env.BASE_DIR); + const all_repositories = await Repository.openAll(env.GIT_DIR); expect(all_repositories).toBeDefined(); @@ -62,7 +62,7 @@ describe("Repository", () => { let repository: Repository; beforeAll(async() => { - repository = await Repository.open(env.BASE_DIR, env.AVAIL_REPO); + repository = await Repository.open(env.GIT_DIR, env.AVAIL_REPO); }); it("Should get the description", async() => { |