Skip to content

Commit

Permalink
Clean Jest config
Browse files Browse the repository at this point in the history
* remove the UI library source from the module mapping, it is expected to run build before test instead
* remove different node_module overrides
* add WP i18n to the module mapping to ensure a singleton, this fixes the text-domain warnings
  • Loading branch information
igorschoester committed Apr 28, 2024
1 parent f23c38e commit 109f72b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/js/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ module.exports = {
"find-with-regex": "<rootDir>/node_modules/find-with-regex/lib/index.js",
"^lodash-es$": "lodash",
"^lodash-es/(.*)$": "lodash/$1",
"@yoast/ui-library": "<rootDir>/../ui-library/src",
"@wordpress/i18n": [
"<rootDir>node_modules/@wordpress/i18n",
"<rootDir>/../../node_modules/@wordpress/i18n",
],
},
moduleDirectories: [
"<rootDir>/node_modules",
"<rootDir>/../../node_modules",
"node_modules",
],
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
],
Expand Down

0 comments on commit 109f72b

Please sign in to comment.