From 43996f83cb0312e88a47543c19ee98c2d8bf368e Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Wed, 30 Dec 2020 17:48:52 -0500 Subject: devtools: update jest config This change updates the jest config to specify test environments separately for unit and e2e tests and adds the isolated modules option to the ts-jest config to improve test startup time. For golang/go#43361 Change-Id: I3fbfae2a42c26bd0eeb2d235dab1cced0c8701ea Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/280711 Trust: Jamal Carvalho Run-TryBot: Jamal Carvalho TryBot-Result: kokoro Reviewed-by: Jonathan Amsterdam --- devtools/config/jest.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/config/jest.config.js b/devtools/config/jest.config.js index 1622999e..8aa1583d 100644 --- a/devtools/config/jest.config.js +++ b/devtools/config/jest.config.js @@ -2,5 +2,9 @@ module.exports = { preset: 'ts-jest', rootDir: '../../', - testEnvironment: 'node', + globals: { + 'ts-jest': { + isolatedModules: true, + }, + }, }; -- cgit v1.3