diff options
author | HampusM <hampus@hampusmat.com> | 2021-07-29 17:10:54 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-07-29 17:10:54 +0200 |
commit | 93a4a8bf924588cd866714b86ec8f16f8d51dec0 (patch) | |
tree | a86d3ecba5838fac11042e8ae257dfe1bd3840cb /test/unit | |
parent | 9d6d2ce8cf34af6e787dae901ee3e5914c4c0fa4 (diff) |
Organized tsconfigs, fixed tests and improved some backend functions
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/patch.unit.test.ts | 4 | ||||
-rw-r--r-- | test/unit/tree.unit.test.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/patch.unit.test.ts b/test/unit/patch.unit.test.ts index e4aa8d3..3197059 100644 --- a/test/unit/patch.unit.test.ts +++ b/test/unit/patch.unit.test.ts @@ -89,7 +89,7 @@ describe("Patch", () => { } }); - it("Should get the hunks of an empty patch and respond with null", async() => { + it("Should get the hunks of an empty patch and respond with an ampty array", async() => { expect.assertions(2); const other_commit = await Commit.lookup(repository, "ef256e9e40b5fd0cc741c509e611808cc66bafad"); @@ -98,7 +98,7 @@ describe("Patch", () => { const hunks = await other_patch.getHunks(); expect(hunks).toBeDefined(); - expect(hunks).toBeNull(); + expect(hunks).toHaveLength(0); }); }); });
\ No newline at end of file diff --git a/test/unit/tree.unit.test.ts b/test/unit/tree.unit.test.ts index d34c93e..3fe49f3 100644 --- a/test/unit/tree.unit.test.ts +++ b/test/unit/tree.unit.test.ts @@ -82,7 +82,7 @@ describe("Tree", () => { // Extract the archive entries to an array of entries const entries = await new Promise((resolve: (value: Entry[]) => void) => { - const entries = []; + const entries: Entry[] = []; extract_archive.on("finish", () => { resolve(entries); |