From 719fd998b159c8a51adc74852dbc5754cc1adcd1 Mon Sep 17 00:00:00 2001 From: simojenki Date: Thu, 20 Oct 2022 13:29:33 +1100 Subject: [PATCH] Set jest timeout globally for all tests as tests break in GH actions due to timeout --- jest.config.js | 3 ++- tests/server.test.ts | 2 -- tests/smapi.test.ts | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/jest.config.js b/jest.config.js index 1759888..ae6aab8 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,5 +5,6 @@ module.exports = { modulePathIgnorePatterns: [ '/node_modules', '/build', - ], + ], + testTimeout: Number.parseInt(process.env["JEST_TIMEOUT"] || "5000") }; \ No newline at end of file diff --git a/tests/server.test.ts b/tests/server.test.ts index 27dd4e7..b8e32ff 100644 --- a/tests/server.test.ts +++ b/tests/server.test.ts @@ -167,8 +167,6 @@ describe("RangeBytesFromFilter", () => { describe("server", () => { - jest.setTimeout(Number.parseInt(process.env["JEST_TIMEOUT"] || "2000")); - beforeEach(() => { jest.clearAllMocks(); jest.resetAllMocks(); diff --git a/tests/smapi.test.ts b/tests/smapi.test.ts index fbbae83..eca9b52 100644 --- a/tests/smapi.test.ts +++ b/tests/smapi.test.ts @@ -90,8 +90,6 @@ describe("rating to and from ints", () => { }); describe("service config", () => { - jest.setTimeout(Number.parseInt(process.env["JEST_TIMEOUT"] || "2000")); - const bonobWithNoContextPath = url("http://localhost:1234"); const bonobWithContextPath = url("http://localhost:5678/some-context-path");