2024-05-15 16:03:11 +00:00
|
|
|
{
|
|
|
|
"rootDir": "../../",
|
|
|
|
"collectCoverageFrom": [
|
|
|
|
"assets/js/**/*.js",
|
|
|
|
"!**/node_modules/**",
|
|
|
|
"!**/vendor/**",
|
|
|
|
"!**/test/**"
|
|
|
|
],
|
|
|
|
"moduleDirectories": [ "node_modules" ],
|
|
|
|
"moduleNameMapper": {
|
|
|
|
"@woocommerce/atomic-blocks": "assets/js/atomic/blocks",
|
|
|
|
"@woocommerce/atomic-utils": "assets/js/atomic/utils",
|
|
|
|
"@woocommerce/icons": "assets/js/icons",
|
|
|
|
"@woocommerce/settings": "assets/js/settings/shared",
|
|
|
|
"@woocommerce/blocks/(.*)$": "assets/js/blocks/$1",
|
|
|
|
"@woocommerce/block-settings": "assets/js/settings/blocks",
|
|
|
|
"@woocommerce/editor-components(.*)$": "assets/js/editor-components/$1",
|
|
|
|
"@woocommerce/blocks-registry": "assets/js/blocks-registry",
|
|
|
|
"@woocommerce/blocks-checkout": "packages/checkout",
|
|
|
|
"@woocommerce/blocks-components": "packages/components",
|
|
|
|
"@woocommerce/price-format": "packages/prices",
|
|
|
|
"@woocommerce/block-hocs(.*)$": "assets/js/hocs/$1",
|
|
|
|
"@woocommerce/base-components(.*)$": "assets/js/base/components/$1",
|
|
|
|
"@woocommerce/base-context(.*)$": "assets/js/base/context/$1",
|
|
|
|
"@woocommerce/base-hocs(.*)$": "assets/js/base/hocs/$1",
|
|
|
|
"@woocommerce/base-hooks(.*)$": "assets/js/base/hooks/$1",
|
|
|
|
"@woocommerce/base-utils(.*)$": "assets/js/base/utils",
|
|
|
|
"@woocommerce/block-data": "assets/js/data",
|
|
|
|
"@woocommerce/resource-previews": "assets/js/previews",
|
|
|
|
"@woocommerce/shared-context": "assets/js/shared/context",
|
|
|
|
"@woocommerce/shared-hocs": "assets/js/shared/hocs",
|
|
|
|
"@woocommerce/blocks-test-utils": "tests/utils",
|
|
|
|
"@woocommerce/types": "assets/js/types",
|
|
|
|
"@woocommerce/utils": "assets/js/utils",
|
|
|
|
"@woocommerce/interactivity": "assets/js/interactivity",
|
|
|
|
"^react$": "<rootDir>/node_modules/react",
|
|
|
|
"^react-dom$": "<rootDir>/node_modules/react-dom"
|
|
|
|
},
|
|
|
|
"setupFiles": [
|
|
|
|
"@wordpress/jest-preset-default/scripts/setup-globals.js",
|
|
|
|
"<rootDir>/tests/js/setup-globals.js",
|
|
|
|
"<rootDir>/tests/js/setup-fetch.js"
|
|
|
|
],
|
|
|
|
"setupFilesAfterEnv": [
|
|
|
|
"<rootDir>/tests/js/setup-after-env.ts"
|
|
|
|
],
|
|
|
|
"testPathIgnorePatterns": [
|
2024-07-19 07:40:01 +00:00
|
|
|
"<rootDir>/bin/",
|
|
|
|
"<rootDir>/build/",
|
|
|
|
"<rootDir>/docs/",
|
2024-05-15 16:03:11 +00:00
|
|
|
"<rootDir>/node_modules/",
|
2024-07-19 07:40:01 +00:00
|
|
|
"<rootDir>/vendor/",
|
|
|
|
"<rootDir>/tests/"
|
2024-05-15 16:03:11 +00:00
|
|
|
],
|
|
|
|
"transformIgnorePatterns": [ "node_modules/?!(simple-html-tokenizer|is-plain-obj|is-plain-object|memize)" ],
|
|
|
|
"testEnvironment": "jsdom",
|
|
|
|
"preset": "@wordpress/jest-preset-default",
|
|
|
|
"transform": {
|
|
|
|
"^.+\\.(js|ts|tsx)$": "<rootDir>/tests/js/jestPreprocess.js"
|
|
|
|
},
|
2024-07-19 07:40:01 +00:00
|
|
|
"verbose": true,
|
|
|
|
"cacheDirectory": "<rootDir>/../../node_modules/.cache/jest"
|
2024-05-15 16:03:11 +00:00
|
|
|
}
|