From 0bd7aeed51c4935206f867029e72f86a013d19b3 Mon Sep 17 00:00:00 2001 From: Kacper Roemer Date: Mon, 20 Nov 2023 08:37:04 +0000 Subject: [PATCH] use transformIgnorePatterns instead of moduleNameMapper --- packages/datagateway-common/package.json | 6 +++--- packages/datagateway-dataview/package.json | 6 +++--- packages/datagateway-download/package.json | 6 +++--- packages/datagateway-search/package.json | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/datagateway-common/package.json b/packages/datagateway-common/package.json index ac10c73b2..453640c0a 100644 --- a/packages/datagateway-common/package.json +++ b/packages/datagateway-common/package.json @@ -102,9 +102,9 @@ ] }, "jest": { - "moduleNameMapper": { - "axios": "axios/dist/node/axios.cjs" - }, + "transformIgnorePatterns": [ + "node_modules/(?!axios)" + ], "collectCoverageFrom": [ "src/**/*.{tsx,ts,js,jsx}", "!src/index.tsx", diff --git a/packages/datagateway-dataview/package.json b/packages/datagateway-dataview/package.json index 74629b14b..66569483c 100644 --- a/packages/datagateway-dataview/package.json +++ b/packages/datagateway-dataview/package.json @@ -83,9 +83,9 @@ ] }, "jest": { - "moduleNameMapper": { - "axios": "axios/dist/node/axios.cjs" - }, + "transformIgnorePatterns": [ + "node_modules/(?!axios)" + ], "collectCoverageFrom": [ "src/**/*.{tsx,ts,js,jsx}", "!src/index.tsx", diff --git a/packages/datagateway-download/package.json b/packages/datagateway-download/package.json index 051ff9c9b..2c05ae334 100644 --- a/packages/datagateway-download/package.json +++ b/packages/datagateway-download/package.json @@ -103,9 +103,9 @@ ] }, "jest": { - "moduleNameMapper": { - "axios": "axios/dist/node/axios.cjs" - }, + "transformIgnorePatterns": [ + "node_modules/(?!axios)" + ], "snapshotSerializers": [ "enzyme-to-json/serializer" ], diff --git a/packages/datagateway-search/package.json b/packages/datagateway-search/package.json index 62ced5b1a..50103c29f 100644 --- a/packages/datagateway-search/package.json +++ b/packages/datagateway-search/package.json @@ -83,9 +83,9 @@ ] }, "jest": { - "moduleNameMapper": { - "axios": "axios/dist/node/axios.cjs" - }, + "transformIgnorePatterns": [ + "node_modules/(?!axios)" + ], "snapshotSerializers": [ "enzyme-to-json/serializer" ],