woocommerce/plugins/woocommerce-blocks/tests/js/jest.config.json

52 lines
1.9 KiB
JSON

{
"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/block-settings": "assets/js/settings/blocks",
"@woocommerce/block-components(.*)$": "assets/js/components/$1",
"@woocommerce/blocks-registry": "assets/js/blocks-registry",
"@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"
},
"setupFiles": [
"<rootDir>/node_modules/@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.js",
"@wordpress/jest-console"
],
"testPathIgnorePatterns": [
"<rootDir>/tests/",
"<rootDir>/node_modules/",
"<rootDir>/vendor/"
],
"transformIgnorePatterns": [ "node_modules/(?!(simple-html-tokenizer)/)" ],
"testEnvironment": "jest-environment-jsdom-sixteen",
"preset": "@wordpress/jest-preset-default",
"transform": {
"^.+\\.js$": "<rootDir>/tests/js/jestPreprocess.js"
},
"verbose": true
}