From 99d4f159b95353d73d5d4ea06969f4a83d553a08 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 6 Dec 2022 16:43:05 -0500 Subject: [PATCH] Add internal jest-raw-loader wrapped appropriately for jest28+ --- client/package.json | 1 - client/tests/jest/jest-raw-loader.js | 3 +++ client/tests/jest/jest.config.js | 2 +- client/yarn.lock | 5 ----- 4 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 client/tests/jest/jest-raw-loader.js diff --git a/client/package.json b/client/package.json index f14cdabfa47..c50fa21e2dc 100644 --- a/client/package.json +++ b/client/package.json @@ -164,7 +164,6 @@ "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", "jest-location-mock": "^1.0.9", - "jest-raw-loader": "^1.0.1", "json-loader": "^0.5.7", "karma": "^6.3.16", "karma-chrome-launcher": "^3.1.0", diff --git a/client/tests/jest/jest-raw-loader.js b/client/tests/jest/jest-raw-loader.js new file mode 100644 index 00000000000..3ef7c744106 --- /dev/null +++ b/client/tests/jest/jest-raw-loader.js @@ -0,0 +1,3 @@ +module.exports = { + process: content => { return { code: "module.exports = " + JSON.stringify(content)}} +}; diff --git a/client/tests/jest/jest.config.js b/client/tests/jest/jest.config.js index 2bd799c9dce..87acca46a81 100644 --- a/client/tests/jest/jest.config.js +++ b/client/tests/jest/jest.config.js @@ -186,7 +186,7 @@ module.exports = { "^.+\\.js$": "babel-jest", "^.*\\.(vue)$": "@vue/vue2-jest", "^.+\\.ya?ml$": "/tests/jest/yaml-jest.js", - "^.+\\.txt$": "jest-raw-loader", + "^.+\\.txt$": "/tests/jest/jest-raw-loader.js", }, // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation diff --git a/client/yarn.lock b/client/yarn.lock index 8bfe3a747d7..4b68a71e9b7 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -6623,11 +6623,6 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-raw-loader@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/jest-raw-loader/-/jest-raw-loader-1.0.1.tgz#ce9f56d54650f157c4a7d16d224ba5d613bcd626" - integrity sha512-g9oaAjeC4/rIJk1Wd3RxVbOfMizowM7LSjEJqa4R9qDX0OjQNABXOhH+GaznUp+DjTGVPi2vPPbQXyX87DOnYg== - jest-regex-util@^29.2.0: version "29.2.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.2.0.tgz#82ef3b587e8c303357728d0322d48bbfd2971f7b"