diff options
| author | HampusM <hampus@hampusmat.com> | 2021-07-25 14:56:58 +0200 | 
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2021-07-25 14:56:58 +0200 | 
| commit | 7b3292af22a0496007e974b65cd2e34521c9c429 (patch) | |
| tree | 8205726e27fa7e5f80cd2a7ffb6c7354a11b6dea /test/unit/tree.unit.test.ts | |
| parent | 4f5771726aa8c7b6d4e288df2a79f1ffef55c3a3 (diff) | |
Reformated unit tests & the setup and teardown scripts
Diffstat (limited to 'test/unit/tree.unit.test.ts')
| -rw-r--r-- | test/unit/tree.unit.test.ts | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/test/unit/tree.unit.test.ts b/test/unit/tree.unit.test.ts index 1f66435..1658c35 100644 --- a/test/unit/tree.unit.test.ts +++ b/test/unit/tree.unit.test.ts @@ -7,7 +7,7 @@ import { EnvironmentVariables } from "../util";  const env = process.env as EnvironmentVariables;  describe("Tree", () => { -	it("Should get the tree of a repository", async () => { +	it("Should get the tree of a repository", async() => {  		expect.assertions(2);  		const tree = await Tree.ofRepository(await Repository.open(env.BASE_DIR, env.AVAIL_REPO)); @@ -19,13 +19,13 @@ describe("Tree", () => {  	describe("Methods", () => {  		let tree: Tree; -		beforeAll(async () => { +		beforeAll(async() => {  			tree = await Tree.ofRepository(await Repository.open(env.BASE_DIR, env.AVAIL_REPO));  		});  		it("Should get the entries", () => {  			expect.hasAssertions(); -			 +  			const entries = tree.entries();  			expect(entries).toBeDefined(); @@ -36,7 +36,7 @@ describe("Tree", () => {  			}  		}); -		it("Should return the entry of a path", async () => { +		it("Should return the entry of a path", async() => {  			expect.assertions(2);  			const entry = await tree.find("packages/server"); @@ -45,19 +45,19 @@ describe("Tree", () => {  			expect(entry).toBeInstanceOf(Tree);  		}); -		it("Should fail to return the entry of a nonexistent path", async () => { +		it("Should fail to return the entry of a nonexistent path", async() => {  			expect.assertions(1);  			await expect(tree.find("dependencies/libstd++")).rejects.toBeInstanceOf(BaseError);  		}); -		it("Should find out if an existent path exists and return true", async () => { +		it("Should find out if an existent path exists and return true", async() => {  			expect.assertions(1);  			await expect(tree.findExists("packages/shared_types/package.json")).resolves.toBeTruthy();  		}); -		it("Should find out if a nonexistent path exists and return false", async () => { +		it("Should find out if a nonexistent path exists and return false", async() => {  			expect.assertions(1);  			await expect(tree.findExists("packages/core/main.js")).resolves.toBeFalsy();  | 
