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/misc.unit.test.ts | |
parent | 30f0b2ee1f494be1786280040fb47ec18bde8a6d (diff) |
Cleaned up the settings implementation & renamed base_dir project-wide to git_dir
Diffstat (limited to 'test/unit/misc.unit.test.ts')
-rw-r--r-- | test/unit/misc.unit.test.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/misc.unit.test.ts b/test/unit/misc.unit.test.ts index c45d8ba..38c69fd 100644 --- a/test/unit/misc.unit.test.ts +++ b/test/unit/misc.unit.test.ts @@ -44,7 +44,7 @@ describe("Miscellaneous functions", () => { it("Should return the content of a file in a bare git repository", async() => { expect.assertions(2); - const content = await getFile(env.BASE_DIR, env.AVAIL_REPO, "description"); + const content = await getFile(env.GIT_DIR, env.AVAIL_REPO, "description"); expect(content).toBeDefined(); expect(content).toEqual("Unnamed repository; edit this file 'description' to name the repository."); @@ -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.BASE_DIR, env.AVAIL_REPO, "myselfasteem")).rejects.toBeInstanceOf(BaseError); + await expect(getFile(env.GIT_DIR, env.AVAIL_REPO, "myselfasteem")).rejects.toBeInstanceOf(BaseError); }); }); @@ -61,7 +61,7 @@ describe("Miscellaneous functions", () => { it("Should return the content of a directory", async() => { expect.assertions(3); - const dir = await getDirectory(`${env.BASE_DIR}/${env.AVAIL_REPO}/refs`); + const dir = await getDirectory(`${env.GIT_DIR}/${env.AVAIL_REPO}/refs`); expect(dir).toBeDefined(); expect(dir).toContain("heads"); @@ -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.BASE_DIR}/${env.AVAIL_REPO}/something`)).rejects.toBeInstanceOf(BaseError); + await expect(getDirectory(`${env.GIT_DIR}/${env.AVAIL_REPO}/something`)).rejects.toBeInstanceOf(BaseError); }); }); });
\ No newline at end of file |