From d41b27f43335cfb1a8ff49aeb121f992332429cf Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 12 Aug 2021 15:37:30 +0200 Subject: Cleaned up the settings implementation & renamed base_dir project-wide to git_dir --- test/unit/misc.unit.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 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 -- cgit v1.2.3-18-g5258