From 66022d5546b32b6ec0dde12f581bfad0c8fcdc18 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 7 Jul 2021 18:03:51 +0200 Subject: Moved the Jest setTimeout to the top of the commit unit test --- test/unit/commit.unit.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/unit/commit.unit.test.ts b/test/unit/commit.unit.test.ts index 5f1d29f..f197583 100644 --- a/test/unit/commit.unit.test.ts +++ b/test/unit/commit.unit.test.ts @@ -1,6 +1,8 @@ import { Repository } from "server/src/git/repository"; import { Commit } from "server/src/git/commit"; +jest.setTimeout(10000); + describe("Commit", () => { let repository: Repository; @@ -33,14 +35,11 @@ describe("Commit", () => { let commit: Commit; beforeAll(async () => { - jest.setTimeout(10000); - commit = await repository.latestCommit(); }); test("Get stats", async () => { const getStats = jest.fn(() => commit.stats()); - await getStats(); expect(getStats).toReturn(); -- cgit v1.2.3-18-g5258