2018-11-16 15:43:51 +00:00
|
|
|
{
|
2019-09-05 15:09:31 +00:00
|
|
|
"rootDir": "../../",
|
|
|
|
"collectCoverageFrom": [
|
|
|
|
"assets/js/**/*.js",
|
|
|
|
"!**/node_modules/**",
|
|
|
|
"!**/vendor/**",
|
|
|
|
"!**/test/**"
|
|
|
|
],
|
2020-07-22 12:20:54 +00:00
|
|
|
"moduleDirectories": [ "node_modules" ],
|
2019-09-05 15:09:31 +00:00
|
|
|
"moduleNameMapper": {
|
2020-05-29 13:49:56 +00:00
|
|
|
"@woocommerce/atomic-blocks": "assets/js/atomic/blocks",
|
2020-05-29 11:28:04 +00:00
|
|
|
"@woocommerce/atomic-utils": "assets/js/atomic/utils",
|
2020-04-29 10:57:58 +00:00
|
|
|
"@woocommerce/icons": "assets/js/icons",
|
2019-09-05 15:09:31 +00:00
|
|
|
"@woocommerce/settings": "assets/js/settings/shared",
|
2023-11-06 07:14:58 +00:00
|
|
|
"@woocommerce/blocks/(.*)$": "assets/js/blocks/$1",
|
2019-10-06 12:36:15 +00:00
|
|
|
"@woocommerce/block-settings": "assets/js/settings/blocks",
|
2020-09-02 08:21:46 +00:00
|
|
|
"@woocommerce/editor-components(.*)$": "assets/js/editor-components/$1",
|
2020-04-29 10:57:58 +00:00
|
|
|
"@woocommerce/blocks-registry": "assets/js/blocks-registry",
|
2021-01-07 12:02:21 +00:00
|
|
|
"@woocommerce/blocks-checkout": "packages/checkout",
|
2023-10-17 09:47:34 +00:00
|
|
|
"@woocommerce/blocks-components": "packages/components",
|
2021-02-04 15:30:28 +00:00
|
|
|
"@woocommerce/price-format": "packages/prices",
|
2019-10-06 12:36:15 +00:00
|
|
|
"@woocommerce/block-hocs(.*)$": "assets/js/hocs/$1",
|
|
|
|
"@woocommerce/base-components(.*)$": "assets/js/base/components/$1",
|
2019-11-14 17:16:27 +00:00
|
|
|
"@woocommerce/base-context(.*)$": "assets/js/base/context/$1",
|
2019-10-28 13:53:09 +00:00
|
|
|
"@woocommerce/base-hocs(.*)$": "assets/js/base/hocs/$1",
|
2019-12-16 16:48:02 +00:00
|
|
|
"@woocommerce/base-hooks(.*)$": "assets/js/base/hooks/$1",
|
2020-03-11 10:50:12 +00:00
|
|
|
"@woocommerce/base-utils(.*)$": "assets/js/base/utils",
|
2020-03-13 13:41:59 +00:00
|
|
|
"@woocommerce/block-data": "assets/js/data",
|
2020-05-28 10:02:10 +00:00
|
|
|
"@woocommerce/resource-previews": "assets/js/previews",
|
2020-06-15 14:59:18 +00:00
|
|
|
"@woocommerce/shared-context": "assets/js/shared/context",
|
2020-07-22 12:20:54 +00:00
|
|
|
"@woocommerce/shared-hocs": "assets/js/shared/hocs",
|
2021-05-25 11:49:13 +00:00
|
|
|
"@woocommerce/blocks-test-utils": "tests/utils",
|
2022-04-21 07:28:41 +00:00
|
|
|
"@woocommerce/types": "assets/js/types",
|
2023-08-10 14:02:33 +00:00
|
|
|
"@woocommerce/utils": "assets/js/utils",
|
2023-09-05 04:03:35 +00:00
|
|
|
"@woocommerce/interactivity": "assets/js/interactivity",
|
|
|
|
"^react$": "<rootDir>/node_modules/react",
|
|
|
|
"^react-dom$": "<rootDir>/node_modules/react-dom"
|
2019-09-05 15:09:31 +00:00
|
|
|
},
|
|
|
|
"setupFiles": [
|
2020-09-07 17:31:10 +00:00
|
|
|
"@wordpress/jest-preset-default/scripts/setup-globals.js",
|
2020-05-20 19:33:16 +00:00
|
|
|
"<rootDir>/tests/js/setup-globals.js",
|
|
|
|
"<rootDir>/tests/js/setup-fetch.js"
|
2019-09-05 15:09:31 +00:00
|
|
|
],
|
2020-06-10 18:21:34 +00:00
|
|
|
"setupFilesAfterEnv": [
|
2022-12-30 15:36:37 +00:00
|
|
|
"<rootDir>/tests/js/setup-after-env.ts"
|
2020-06-10 18:21:34 +00:00
|
|
|
],
|
2020-02-11 16:13:20 +00:00
|
|
|
"testPathIgnorePatterns": [
|
2020-02-13 17:53:15 +00:00
|
|
|
"<rootDir>/tests/",
|
|
|
|
"<rootDir>/node_modules/",
|
|
|
|
"<rootDir>/vendor/"
|
2020-02-11 16:13:20 +00:00
|
|
|
],
|
2023-09-05 04:03:35 +00:00
|
|
|
"transformIgnorePatterns": [ "node_modules/?!(simple-html-tokenizer|is-plain-obj|is-plain-object|memize)" ],
|
2022-03-28 13:00:20 +00:00
|
|
|
"testEnvironment": "jsdom",
|
2019-09-05 15:09:31 +00:00
|
|
|
"preset": "@wordpress/jest-preset-default",
|
|
|
|
"transform": {
|
2021-02-26 11:57:49 +00:00
|
|
|
"^.+\\.(js|ts|tsx)$": "<rootDir>/tests/js/jestPreprocess.js"
|
2019-09-05 15:09:31 +00:00
|
|
|
},
|
2022-04-01 08:22:54 +00:00
|
|
|
"verbose": true
|
2020-07-22 12:20:54 +00:00
|
|
|
}
|