@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 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
- - `snapshotSerializers` - makes it possible to use snapshot tests on `Enzyme` wrappers.
34
- - `testMatch`- includes `/test/` subfolder in addition to the glob patterns Jest uses to detect test files. It detects only test files containing `.js`, `.jsx`, `.ts` and `.tsx` suffix. It doesn't match files with `.spec.js` suffix.
35
- - `timers` - use of [fake timers](https://jestjs.io/docs/en/timer-mocks.html) for functions such as `setTimeout` is enabled.
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
@@ -24,7 +24,6 @@ module.exports = {
24
24
  '**/?(*.)test.[jt]s?(x)',
25
25
  ],
26
26
  testPathIgnorePatterns: [ '/node_modules/', '<rootDir>/vendor/' ],
27
- timers: 'real',
28
27
  transform: {
29
28
  '\\.[jt]sx?$': require.resolve( 'babel-jest' ),
30
29
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/jest-preset-default",
3
- "version": "10.9.0",
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": "^6.11.0",
34
- "babel-jest": "^27.4.5"
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": ">=27"
38
+ "jest": ">=29"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "d5e03a74b79e3ca84afda24375474a103a063ee4"
43
+ "gitHead": "9534a7b3bbf07c1d40b94fdb7a3d091f297bfb06"
44
44
  }