From 3b29eb997db1248b80c6746e67f9b714741e0925 Mon Sep 17 00:00:00 2001 From: Jimmy Guzman Date: Sat, 11 Apr 2020 12:06:38 -0500 Subject: [PATCH] =?UTF-8?q?chore(workspace):=20=F0=9F=A4=96=20fixed=20test?= =?UTF-8?q?s=20failing=20due=20to=20jest.roots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This addresses https://github.com/facebook/jest/pull/9569 --- apps/portfolio/jest.config.js | 6 ++++-- jest.config.base.js | 2 +- jest.config.js | 4 ++-- packages/components/jest.config.js | 6 ++++-- packages/hooks/jest.config.js | 6 ++++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/portfolio/jest.config.js b/apps/portfolio/jest.config.js index 0d7bf90..105ad34 100644 --- a/apps/portfolio/jest.config.js +++ b/apps/portfolio/jest.config.js @@ -1,9 +1,11 @@ +const { name } = require('./package') const base = require('../../jest.config.base.js') module.exports = { ...base, preset: undefined, - name: '@jimmy-guzman/portfolio', - displayName: '@jimmy-guzman/portfolio', + roots: ['/src'], + name, + displayName: name, setupFilesAfterEnv: ['/jest.setup.js'] } diff --git a/jest.config.base.js b/jest.config.base.js index a2ea566..414f1cf 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -10,7 +10,7 @@ module.exports = { } }, coverageReporters: ['html', 'text'], - roots: ['/src'], + verbose: true, moduleNameMapper: { '^.+\\.(css|scss)$': 'identity-obj-proxy' diff --git a/jest.config.js b/jest.config.js index 30dc43a..da27044 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,6 @@ const base = require('./jest.config.base.js') module.exports = { - ...base, - projects: ['/{packages,apps}/*/jest.config.js'] + projects: ['/{packages,apps}/*/jest.config.js'], + ...base } diff --git a/packages/components/jest.config.js b/packages/components/jest.config.js index ee2be03..e1ae32a 100644 --- a/packages/components/jest.config.js +++ b/packages/components/jest.config.js @@ -1,7 +1,9 @@ +const { name } = require('./package') const base = require('../../jest.config.base.js') module.exports = { ...base, - name: '@jimmy-guzman/components', - displayName: '@jimmy-guzman/components' + roots: ['/src'], + name, + displayName: name } diff --git a/packages/hooks/jest.config.js b/packages/hooks/jest.config.js index c95c37f..e1ae32a 100644 --- a/packages/hooks/jest.config.js +++ b/packages/hooks/jest.config.js @@ -1,7 +1,9 @@ +const { name } = require('./package') const base = require('../../jest.config.base.js') module.exports = { ...base, - name: '@jimmy-guzman/hooks', - displayName: '@jimmy-guzman/hooks' + roots: ['/src'], + name, + displayName: name }