Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Jest to version 24 (breaking changes) #13922

Merged
merged 7 commits into from
Feb 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,060 changes: 1,963 additions & 2,097 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"deasync": "0.1.14",
"deep-freeze": "0.0.1",
"doctrine": "2.1.0",
"enzyme": "3.7.0",
"enzyme": "3.9.0",
"eslint-plugin-jest": "21.5.0",
"espree": "3.5.4",
"fbjs": "0.8.17",
Expand Down
6 changes: 6 additions & 0 deletions packages/babel-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 4.0.0 (Unreleased)

## Breaking Change

- Removed `babel-core` dependency acting as Babel 7 bridge ([#13922](https://github.com/WordPress/gutenberg/pull/13922). Ensure all references to `babel-core` are replaced with `@babel/core` .

## 3.0.0 (2018-09-30)

## Breaking Change
Expand Down
3 changes: 1 addition & 2 deletions packages/babel-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.3.1",
"@babel/runtime": "^7.3.1",
"@wordpress/browserslist-config": "file:../browserslist-config",
"babel-core": "^7.0.0-bridge.0"
"@wordpress/browserslist-config": "file:../browserslist-config"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-default/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import path from 'path';
import { readFileSync } from 'fs';
import { transform } from 'babel-core';
import { transform } from '@babel/core';

/**
* Internal dependencies
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/slot-fill/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ describe( 'createSlotFill', () => {
const wrapper = shallow( <MySlotFill.Fill /> );

expect( wrapper.type() ).toBe( Fill );
expect( wrapper ).toHaveProp( 'name', SLOT_NAME );
expect( wrapper.prop( 'name' ) ).toBe( SLOT_NAME );
} );

test( 'should match snapshot for Slot', () => {
const wrapper = shallow( <MySlotFill.Slot /> );

expect( wrapper.type() ).toBe( Slot );
expect( wrapper ).toHaveProp( 'name', SLOT_NAME );
expect( wrapper.prop( 'name' ) ).toBe( SLOT_NAME );
} );
} );
2 changes: 1 addition & 1 deletion packages/e2e-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"node-fetch": "^1.7.3"
},
"peerDependencies": {
"jest": ">=23",
"jest": ">=24",
"puppeteer": ">=1.6"
},
"publishConfig": {
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/config/setup-test-framework.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
import 'expect-puppeteer';
import { get } from 'lodash';

/**
Expand Down
9 changes: 8 additions & 1 deletion packages/e2e-tests/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
module.exports = {
...require( '@wordpress/scripts/config/jest-e2e.config' ),
setupTestFrameworkScriptFile: '<rootDir>/config/setup-test-framework.js',
setupFiles: [
'<rootDir>/config/gutenberg-phase.js',
],
setupFilesAfterEnv: [
'<rootDir>/config/setup-test-framework.js',
'expect-puppeteer',
],
transformIgnorePatterns: [
'node_modules',
'scripts/config/puppeteer.config.js',
gziolo marked this conversation as resolved.
Show resolved Hide resolved
],
};
3 changes: 1 addition & 2 deletions packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
"@wordpress/e2e-test-utils": "file:../e2e-test-utils",
"@wordpress/jest-console": "file:../jest-console",
"@wordpress/scripts": "file:../scripts",
"expect-puppeteer": "^3.2.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed? It's still referenced as an import:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it because, via jestjs/jest#7119 , we can trust it to be provided through the preset from jest-puppeteer as introduced by argos-ci/jest-puppeteer#196 ? In which case, we just need to remove the above import?

Copy link
Member Author

@gziolo gziolo Feb 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Jest doesn't merge setupFIlesAfterEnv values from preset and the config itself. It overrides instead:

$ npm run test-e2e -- --showConfig

> gutenberg@5.1.1 test-e2e /Users/gziolo/PhpstormProjects/gutenberg
> wp-scripts test-e2e --config packages/e2e-tests/jest.config.js "--showConfig"
{
  "configs": [
    {
      "automock": false,
      "browser": false,
      "cache": true,
      "cacheDirectory": "/private/var/folders/8t/0144m_sn3_q5x_cjrfflbkxm0000gn/T/jest_dx",
      "clearMocks": false,
      "coveragePathIgnorePatterns": [
        "/node_modules/"
      ],
      "cwd": "/Users/gziolo/PhpstormProjects/gutenberg",
      "dependencyExtractor": null,
      "detectLeaks": false,
      "detectOpenHandles": false,
      "errorOnDeprecated": false,
      "filter": null,
      "forceCoverageMatch": [],
      "globalSetup": "/Users/gziolo/PhpstormProjects/gutenberg/node_modules/jest-environment-puppeteer/setup.js",
      "globalTeardown": "/Users/gziolo/PhpstormProjects/gutenberg/node_modules/jest-environment-puppeteer/teardown.js",
      "globals": {},
      "haste": {
        "computeSha1": false,
        "providesModuleNodeModules": []
      },
      "moduleDirectories": [
        "node_modules"
      ],
      "moduleFileExtensions": [
        "js",
        "json",
        "jsx",
        "ts",
        "tsx",
        "node"
      ],
      "moduleNameMapper": {},
      "modulePathIgnorePatterns": [],
      "name": "8d30620c7b75cfd5f4f78d9ee46d32f5",
      "prettierPath": "prettier",
      "resetMocks": false,
      "resetModules": false,
      "resolver": null,
      "restoreMocks": false,
      "rootDir": "/Users/gziolo/PhpstormProjects/gutenberg/packages/e2e-tests",
      "roots": [
        "/Users/gziolo/PhpstormProjects/gutenberg/packages/e2e-tests"
      ],
      "runner": "jest-runner",
      "setupFiles": [
        "/Users/gziolo/PhpstormProjects/gutenberg/packages/e2e-tests/config/gutenberg-phase.js"
      ],
      "setupFilesAfterEnv": [
        "/Users/gziolo/PhpstormProjects/gutenberg/packages/e2e-tests/config/setup-test-framework.js"
      ],
      "skipFilter": false,
      "snapshotSerializers": [],
      "testEnvironment": "/Users/gziolo/PhpstormProjects/gutenberg/node_modules/jest-environment-puppeteer/index.js",
      "testEnvironmentOptions": {},
      "testLocationInResults": false,
      "testMatch": [
        "**/__tests__/**/*.js",
        "**/?(*.)(spec|test).js",
        "**/test/*.js"
      ],
      "testPathIgnorePatterns": [
        "/node_modules/"
      ],
      "testRegex": [],
      "testRunner": "/Users/gziolo/PhpstormProjects/gutenberg/node_modules/jest-jasmine2/build/index.js",
      "testURL": "http://localhost",
      "timers": "real",
      "transform": [
        [
          "^.+\\.[jt]sx?$",
          "/Users/gziolo/PhpstormProjects/gutenberg/node_modules/babel-jest/build/index.js"
        ]
      ],
      "transformIgnorePatterns": [
        "node_modules",
        "scripts/config/puppeteer.config.js"
      ],
      "watchPathIgnorePatterns": []
    }
  ],
  "globalConfig": {
    "bail": 0,
    "changedFilesWithAncestor": false,
    "collectCoverage": false,
    "collectCoverageFrom": null,
    "coverageDirectory": "/Users/gziolo/PhpstormProjects/gutenberg/packages/e2e-tests/coverage",
    "coverageReporters": [
      "json",
      "text",
      "lcov",
      "clover"
    ],
    "coverageThreshold": null,
    "detectLeaks": false,
    "detectOpenHandles": false,
    "errorOnDeprecated": false,
    "expand": false,
    "filter": null,
    "globalSetup": "/Users/gziolo/PhpstormProjects/gutenberg/node_modules/jest-environment-puppeteer/setup.js",
    "globalTeardown": "/Users/gziolo/PhpstormProjects/gutenberg/node_modules/jest-environment-puppeteer/teardown.js",
    "listTests": false,
    "maxConcurrency": 5,
    "maxWorkers": 1,
    "noStackTrace": false,
    "nonFlagArgs": [],
    "notify": false,
    "notifyMode": "failure-change",
    "passWithNoTests": false,
    "projects": null,
    "rootDir": "/Users/gziolo/PhpstormProjects/gutenberg/packages/e2e-tests",
    "runTestsByPath": false,
    "skipFilter": false,
    "testFailureExitCode": 1,
    "testPathPattern": "",
    "testResultsProcessor": null,
    "updateSnapshot": "new",
    "useStderr": false,
    "verbose": null,
    "watch": false,
    "watchman": true
  },
  "version": "24.1.0"
}

I will add expect-puppeteer" in the config explicitly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed? It's still referenced as an import:

gutenberg/packages/e2e-tests/config/setup-test-framework.js

Line 4 in 5cf3bb9

import 'expect-puppeteer';

I'm still not sure whether we should include it in the package.json explicitly given that it is included in jest-puppeteer. It probably doesn't harm to do it. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not sure whether we should include it in the package.json explicitly given that it is included in jest-puppeteer. It probably doesn't harm to do it. What do you think?

This specific reference is a bit unique than a traditional import statement, but I'd prefer we err on the side of: If we reference it as a dependency anywhere, always define it as a dependency. I'd love to see some ESLint code enforcement around this too (i.e. if there's an import in a package file, make sure the package declares that as a dependency).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, it's referenced in the config file and it repeats what was already provided in the preset:

I think I will add it as a dependency just for consistency. It would be nicer if we could just include additional entries rather than repeat what was already listed in the preset.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in #14212.

"lodash": "^4.17.11"
},
"peerDependencies": {
"jest": ">=23",
"jest": ">=24",
"puppeteer": ">=1.6"
},
"publishConfig": {
Expand Down
7 changes: 4 additions & 3 deletions packages/editor/src/components/block-edit/test/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe( 'Edit', () => {

const wrapper = shallow( <Edit name="core/test-block" /> );

expect( wrapper.find( edit ) ).toExist();
expect( wrapper.exists( edit ) ).toBe( true );
} );

it( 'should use save implementation of block as fallback', () => {
Expand All @@ -55,7 +55,7 @@ describe( 'Edit', () => {

const wrapper = shallow( <Edit name="core/test-block" /> );

expect( wrapper.find( save ) ).toExist();
expect( wrapper.exists( save ) ).toBe( true );
} );

it( 'should combine the default class name with a custom one', () => {
Expand All @@ -74,6 +74,7 @@ describe( 'Edit', () => {
<Edit name="core/test-block" attributes={ attributes } />
);

expect( wrapper.find( edit ) ).toHaveClassName( 'wp-block-test-block my-class' );
expect( wrapper.find( edit ).hasClass( 'wp-block-test-block' ) ).toBe( true );
expect( wrapper.find( edit ).hasClass( 'my-class' ) ).toBe( true );
} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ exports[`DefaultBlockAppender should append a default block when input focused 1
"calls": Array [
Array [],
],
"results": undefined,
"results": Array [
Object {
"type": "return",
"value": undefined,
},
],
}
}
readOnly={true}
Expand Down
6 changes: 3 additions & 3 deletions packages/editor/src/components/page-attributes/test/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ describe( 'PageAttributesCheck', () => {
it( 'should render if page attributes support is true and no available templates exist', () => {
const wrapper = shallow( <PageAttributesCheck postType={ postType }>content</PageAttributesCheck> );

expect( wrapper ).toHaveText( 'content' );
expect( wrapper.text() ).toContain( 'content' );
} );

it( 'should render if page attributes support is false/unknown and available templates exist', () => {
const wrapper = shallow( <PageAttributesCheck availableTemplates={ { 'example.php': 'Example template' } } >content</PageAttributesCheck> );

expect( wrapper ).toHaveText( 'content' );
expect( wrapper.text() ).toContain( 'content' );
} );

it( 'should render if page attributes support is true and available templates exist', () => {
const wrapper = shallow( <PageAttributesCheck availableTemplates={ { 'example.php': 'Example template' } } postType={ postType }>content</PageAttributesCheck> );

expect( wrapper ).toHaveText( 'content' );
expect( wrapper.text() ).toContain( 'content' );
} );
} );
8 changes: 7 additions & 1 deletion packages/jest-console/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 3.0.0 (Unreleased)

### Breaking Changes

- Increased the recommended Jest dependency to version 24 ([#13922](https://github.com/WordPress/gutenberg/pull/13922).

## 2.0.7 (2018-11-20)

## 2.0.5 (2018-09-30)
Expand All @@ -8,7 +14,7 @@

## 2.0.0 (2018-07-12)

### Breaking Change
### Breaking Changes

- Add new API methods `toHaveInformed`, `toHaveInformedWith`, `toHaveLogged` and `toHaveLoggedWith` ([#137](https://github.com/WordPress/packages/pull/137)). If the code under test calls `console.log` or `console.info` it will fail, unless one of the newly introduced methods is explicitly used to verify it.
- Updated code to work with Babel 7 ([#7832](https://github.com/WordPress/gutenberg/pull/7832))
Expand Down
12 changes: 4 additions & 8 deletions packages/jest-console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,16 @@ npm install @wordpress/jest-console --save-dev

### Setup

The simplest setup is to use Jest's `setupTestFrameworkScriptFile` config option:
The simplest setup is to use Jest's `setupFilesAfterEnv` config option:

```js
"jest": {
"setupTestFrameworkScriptFile": "./node_modules/@wordpress/jest-console/build/index.js"
"setupFilesAfterEnv": [
"@wordpress/jest-console"
]
},
```

If your project already has a script file which sets up the test framework, you will need the following import statement:

```js
import '@wordpress/jest-console';
```

### Usage

### `.toHaveErrored()`
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"module": "build-module/index.js",
"dependencies": {
"@babel/runtime": "^7.3.1",
"jest-matcher-utils": "^23.6.0",
"jest-matcher-utils": "^24.0.0",
"lodash": "^4.17.11"
},
"peerDependencies": {
"jest": ">=22"
"jest": ">=24"
},
"publishConfig": {
"access": "public"
Expand Down
11 changes: 11 additions & 0 deletions packages/jest-preset-default/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 4.0.0 (Unreleased)

### Breaking Changes

- The bundled `jest` dependency has been updated from requiring `^23.6.0` to requiring `^24.1.0` (see [Breaking Changes](https://jestjs.io/blog/2019/01/25/jest-24-refreshing-polished-typescript-friendly#breaking-changes), [#13922](https://github.com/WordPress/gutenberg/pull/13922)).
- The bundled `jest-enzyme` dependency has been removed completely ([#13922](https://github.com/WordPress/gutenberg/pull/13922)).

### Internal

- The bundled `enzyme` dependency has been updated from requiring `^3.7.0` to requiring `^3.9.0` ([#13922](https://github.com/WordPress/gutenberg/pull/13922)).

## 3.0.3 (2018-11-20)

## 3.0.2 (2018-11-09)
Expand Down
16 changes: 3 additions & 13 deletions packages/jest-preset-default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,11 @@ npm install @wordpress/jest-preset-default --save-dev
* `moduleNameMapper` - all `css` and `scss` files containing CSS styles will be stubbed out.
* `modulePaths` - the root dir of the project is used as a location to search when resolving modules.
* `setupFiles` - runs code before each test which sets up global variables required in the testing environment.
* `setupTestFrameworkScriptFile` - runs code which adds improved support for `Console` object and `React` components to the testing framework before each test.
* `setupFilesAfterEnv` - runs code which adds improved support for `Console` object and `React` components to the testing framework before each test.
* `snapshotSerializers` - makes it possible to use snapshot tests on `Enzyme` wrappers.
* `testMatch`- includes `/test/` subfolder in the glob patterns Jest uses to detect test files. It detects only test files containing `.js` extension.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snapshotSerializers - should be added to docs.

* `timers` - use of [fake timers](https://jestjs.io/docs/en/timer-mocks.html) for functions such as `setTimeout` is enabled.
* `transform` - adds support for [PEG.js]( https://github.com/pegjs/pegjs#javascript-api) transformed necessary for WordPress blocks. It also keeps the default [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest) transformer.
* `transform` - keeps the default [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest) transformer.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We removed pegjs support a few months back :)

* `verbose` - each individual test won't be reported during the run.

#### Overriding `setupTestFrameworkScriptFile`

It is also possible to override the script that runs some code to configure or set up the testing framework before each test. To do so you will need to create `setup-test-framework.js` inside your project with the following content:

```js
// You can still load the default script provided by this setup
import '@wordpress/jest-preset-default';

// Your code goes here
```

<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
9 changes: 7 additions & 2 deletions packages/jest-preset-default/jest-preset.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@
"setupFiles": [
"<rootDir>/node_modules/@wordpress/jest-preset-default/scripts/setup-globals.js"
],
"setupTestFrameworkScriptFile": "<rootDir>/node_modules/@wordpress/jest-preset-default/scripts/setup-test-framework.js",
"setupFilesAfterEnv": [
"<rootDir>/node_modules/@wordpress/jest-preset-default/scripts/setup-test-framework.js"
],
"snapshotSerializers": [
"<rootDir>/node_modules/enzyme-to-json/serializer.js"
],
"testMatch": [
"**/__tests__/**/*.js",
"**/?(*.)(spec|test).js",
"**/test/*.js"
],
"timers": "fake",
"transform": {
"^.+\\.jsx?$": "<rootDir>/node_modules/babel-jest"
"^.+\\.[jt]sx?$": "<rootDir>/node_modules/babel-jest"
},
"verbose": true
}
10 changes: 5 additions & 5 deletions packages/jest-preset-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"main": "index.js",
"dependencies": {
"@wordpress/jest-console": "file:../jest-console",
"babel-jest": "^23.6.0",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.6.0",
"jest-enzyme": "^6.0.2"
"babel-jest": "^24.1.0",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.9.1",
"enzyme-to-json": "^3.3.5"
},
"peerDependencies": {
"jest": ">=23"
"jest": ">=24"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 0 additions & 3 deletions packages/jest-preset-default/scripts/setup-test-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jest.mock( 'enzyme', () => {
// configure enzyme 3 for React, from docs: http://airbnb.io/enzyme/docs/installation/index.html
const Adapter = require.requireActual( 'enzyme-adapter-react-16' );
actualEnzyme.configure( { adapter: new Adapter() } );

// configure assertions for enzyme
require.requireActual( 'jest-enzyme' );
}
return actualEnzyme;
} );
12 changes: 4 additions & 8 deletions packages/jest-puppeteer-axe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,16 @@ npm install @wordpress/jest-puppeteer-axe --save-dev

### Setup

The simplest setup is to use Jest's `setupTestFrameworkScriptFile` config option:
The simplest setup is to use Jest's `setupFilesAfterEnv` config option:

```js
"jest": {
"setupTestFrameworkScriptFile": "./node_modules/@wordpress/jest-puppeteer-axe/build/index.js"
"setupFilesAfterEnv": [
"@wordpress/jest-puppeteer-axe"
]
},
```

If your project already has a script file which sets up the test framework, you will need the following import statement:

```js
import '@wordpress/jest-puppeteer-axe';
```

## Usage

In your Jest test suite add the following code to the test's body:
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-puppeteer-axe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"axe-puppeteer": "^0.1.0"
"axe-puppeteer": "^1.0.0"
},
"peerDependencies": {
"jest": ">=23",
"jest": ">=24",
"puppeteer": ">=1.6"
},
"publishConfig": {
Expand Down
2 changes: 2 additions & 0 deletions packages/scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
### Breaking Changes

- The bundled `eslint` dependency has been updated from requiring `^4.19.1` to requiring `^5.12.1` (see [Migration Guide](https://eslint.org/docs/user-guide/migrating-to-5.0.0)).
- The bundled `jest` dependency has been updated from requiring `^23.6.0` to requiring `^24.1.0` (see [Breaking Changes](https://jestjs.io/blog/2019/01/25/jest-24-refreshing-polished-typescript-friendly#breaking-changes), [#13922](https://github.com/WordPress/gutenberg/pull/13922)).
- The bundled `jest-puppeteer` dependency has been updated from requiring `3.2.1` to requiring `^4.0.0` ([#13922](https://github.com/WordPress/gutenberg/pull/13922)).

### New Features

Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/config/jest-e2e.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const jestE2EConfig = {

if ( ! hasBabelConfig() ) {
jestE2EConfig.transform = {
'^.+\\.jsx?$': path.join( __dirname, 'babel-transform' ),
'^.+\\.[jt]sx?$': path.join( __dirname, 'babel-transform' ),
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/config/jest-unit.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const jestUnitConfig = {

if ( ! hasBabelConfig() ) {
jestUnitConfig.transform = {
'^.+\\.jsx?$': path.join( __dirname, 'babel-transform' ),
'^.+\\.[jt]sx?$': path.join( __dirname, 'babel-transform' ),
};
}

Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"check-node-version": "^3.1.1",
"cross-spawn": "^5.1.0",
"eslint": "^5.12.1",
"jest": "^23.6.0",
"jest-puppeteer": "3.2.1",
"jest": "^24.1.0",
"jest-puppeteer": "^4.0.0",
"npm-package-json-lint": "^3.3.1",
"puppeteer": "1.6.1",
"read-pkg-up": "^1.0.1",
Expand Down