diff --git a/packages/server/jest.config.js b/packages/server/jest.config.js index 671827271..71156e196 100644 --- a/packages/server/jest.config.js +++ b/packages/server/jest.config.js @@ -10,5 +10,7 @@ module.exports = { testEnvironment: 'node', - slowTestThreshold: 20, + slowTestThreshold: 30, + + setupFilesAfterEnv: [`${__dirname}/jest.setup.js`], }; diff --git a/packages/server/jest.setup.js b/packages/server/jest.setup.js new file mode 100644 index 000000000..ac7733a29 --- /dev/null +++ b/packages/server/jest.setup.js @@ -0,0 +1,3 @@ +// We don't want the tests to fail due to timeout, especially on CI, and certain +// tests can take more time since we do integration testing too. +jest.setTimeout(30 * 1000); diff --git a/packages/server/src/utils/testUtils.ts b/packages/server/src/utils/testUtils.ts index 4fa28e329..bdc8452a8 100644 --- a/packages/server/src/utils/testUtils.ts +++ b/packages/server/src/utils/testUtils.ts @@ -13,10 +13,6 @@ const packageRootDir = `${__dirname}/../..`; let db_: DbConnection = null; -// We don't want the tests to fail due to timeout, especially on CI, and certain -// tests can take more time since we do integration testing too. -jest.setTimeout(30 * 1000); - // require('source-map-support').install(); export async function beforeAllDb(unitName: string) {