From 26b1810168ebbd7043b18d12815ed014f80c6f81 Mon Sep 17 00:00:00 2001 From: Kar Rui Lau Date: Thu, 3 Dec 2020 22:18:24 +0800 Subject: [PATCH] fix(temp): use isolatedModules in ts-jest `isolatedModules` being set to true will fix a memory leak in ts-jest. However, type checking will not be performed whilst running tests (will still have type checking when writing tests). Revert after the memory leak is fixed. See https://github.com/kulshekhar/ts-jest/issues/1967 See: https://kulshekhar.github.io/ts-jest/user/config/isolatedModules --- jest.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jest.config.js b/jest.config.js index 31005a6586..4f33c3d8c0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -12,4 +12,11 @@ module.exports = { statements: 38, // Increase this percentage as test coverage improves }, }, + globals: { + // Revert when memory leak in ts-jest is fixed. + // See https://github.com/kulshekhar/ts-jest/issues/1967. + 'ts-jest': { + isolatedModules: true, + }, + }, }