@wordpress/jest-preset-default 10.9.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/jest-preset.js +0 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -30,11 +30,10 @@ npm install @wordpress/jest-preset-default --save-dev
|
|
|
30
30
|
- `modulePaths` - the root dir of the project is used as a location to search when resolving modules.
|
|
31
31
|
- `setupFiles` - runs code before each test which sets up global variables required in the testing environment.
|
|
32
32
|
- `setupFilesAfterEnv` - runs code which adds improved support for `Console` object and `React` components to the testing framework before each test.
|
|
33
|
-
- `
|
|
34
|
-
- `testMatch
|
|
35
|
-
- `
|
|
33
|
+
- `testEnvironment` - enabled the `jsdom` environment for all tests by default.
|
|
34
|
+
- `testMatch` - searches for tests in `/test/` and `/__tests__/` subfolders, and also matches all files with a `.test.*` suffix. It detects test files with a `.js`, `.jsx`, `.ts` or `.tsx` suffix. Compared to default Jest configuration, it doesn't match files with the `.spec.*` suffix.
|
|
35
|
+
- `testPathIgnorePatterns` - excludes `node_modules` and `vendor` directories from searching for test files.
|
|
36
36
|
- `transform` - keeps the default [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) transformer.
|
|
37
|
-
- `verbose` - each individual test won't be reported during the run.
|
|
38
37
|
|
|
39
38
|
#### Using enzyme
|
|
40
39
|
|
package/jest-preset.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/jest-preset-default",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "Default Jest preset for WordPress development.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
],
|
|
31
31
|
"main": "index.js",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@wordpress/jest-console": "^
|
|
34
|
-
"babel-jest": "^
|
|
33
|
+
"@wordpress/jest-console": "^7.0.0",
|
|
34
|
+
"babel-jest": "^29.5.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@babel/core": ">=7",
|
|
38
|
-
"jest": ">=
|
|
38
|
+
"jest": ">=29"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "9534a7b3bbf07c1d40b94fdb7a3d091f297bfb06"
|
|
44
44
|
}
|