From a3e01d11004b16373c402703e6e98fcc8823c192 Mon Sep 17 00:00:00 2001 From: Jon Rista Date: Sun, 29 Sep 2019 13:01:46 -0600 Subject: [PATCH] fix(nx): merge jest.config.js globals with tsJestConfig instead of replacing resolves #1059 --- packages/jest/src/builders/jest/jest.impl.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/jest/src/builders/jest/jest.impl.ts b/packages/jest/src/builders/jest/jest.impl.ts index ed22c76327274b..b51fe312049187 100644 --- a/packages/jest/src/builders/jest/jest.impl.ts +++ b/packages/jest/src/builders/jest/jest.impl.ts @@ -76,7 +76,10 @@ function run( const jestConfig: { globals: any } = require(options.jestConfig); const globals = jestConfig.globals || {}; Object.assign(globals, { - 'ts-jest': tsJestConfig + 'ts-jest': { + ...(globals['ts-jest'] || {}), + ...tsJestConfig + } }); const config: any = {