diff --git a/.eslintrc.js b/.eslintrc.js index 7bbda939ba8..7d2e8b509e5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -148,6 +148,8 @@ module.exports = { 'jest/prefer-expect-assertions': 'off', 'jest/prefer-inline-snapshots': 'off', 'jest/unbound-method': 'off', + // Disabling because it's not the Jest environment. + 'jest/prefer-importing-jest-globals': 'off', }, }, { diff --git a/.github/workflows/build-test-measure.yml b/.github/workflows/build-test-measure.yml index 1a9bc5db280..f1fbd679666 100644 --- a/.github/workflows/build-test-measure.yml +++ b/.github/workflows/build-test-measure.yml @@ -328,11 +328,11 @@ jobs: external-http: true - php: '7.4' - wp: '5.3' + wp: '6.3' phpunit: '7' - php: '7.4' - wp: '5.3' + wp: '6.3' phpunit: '7' external-http: true steps: @@ -507,7 +507,7 @@ jobs: wp: 'latest' - php: '7.4' - wp: '5.3' + wp: '6.3' steps: - name: Shutdown default MySQL service if: needs.pre-run.outputs.changed-php-count > 0 diff --git a/.gitignore b/.gitignore index 056b57d7be6..02c5500f509 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ node_modules /vendor /build +/artifacts /wiki /amp.zip /assets/css/* diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 07a68a468c0..1e3de19057d 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -15,7 +15,6 @@ - diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index dfb86685052..a1a9ce1089f 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -24,7 +24,6 @@ 'admin.amp_themes' => \AmpProject\AmpWP\Admin\AmpThemes::class, 'amp_slug_customization_watcher' => \AmpProject\AmpWP\AmpSlugCustomizationWatcher::class, 'background_task_deactivator' => \AmpProject\AmpWP\BackgroundTask\BackgroundTaskDeactivator::class, - 'block_uniqid_transformer' => \AmpProject\AmpWP\BlockUniqidTransformer::class, 'cli.command_namespace' => \AmpProject\AmpWP\Cli\CommandNamespaceRegistration::class, 'cli.optimizer_command' => \AmpProject\AmpWP\Cli\OptimizerCommand::class, 'cli.transformer_command' => \AmpProject\AmpWP\Cli\TransformerCommand::class, diff --git a/README.md b/README.md index c85f2c2d671..8ccc54a4b38 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ An easier path to great Page Experience for everyone. Powered by AMP. **Contributors:** [google](https://profiles.wordpress.org/google), [xwp](https://profiles.wordpress.org/xwp), [rtcamp](https://profiles.wordpress.org/rtcamp), [automattic](https://profiles.wordpress.org/automattic), [westonruter](https://profiles.wordpress.org/westonruter), [albertomedina](https://profiles.wordpress.org/albertomedina), [schlessera](https://profiles.wordpress.org/schlessera), [delawski](https://profiles.wordpress.org/delawski/), [swissspidy](https://profiles.wordpress.org/swissspidy), [pierlo](https://profiles.wordpress.org/pierlo), [joshuawold](https://profiles.wordpress.org/joshuawold), [thelovekesh](https://profiles.wordpress.org/thelovekesh/) **Tags:** [page experience](https://wordpress.org/plugins/tags/page-experience), [performance](https://wordpress.org/plugins/tags/performance), [amp](https://wordpress.org/plugins/tags/amp), [mobile](https://wordpress.org/plugins/tags/mobile), [optimization](https://wordpress.org/plugins/tags/optimization) -**Requires at least:** 5.3 +**Requires at least:** 6.3 **Tested up to:** 6.5 **Stable tag:** 2.5.3 **License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html) diff --git a/amp.php b/amp.php index 5c4b6c7344c..ef49c801b00 100644 --- a/amp.php +++ b/amp.php @@ -7,7 +7,7 @@ * Author URI: https://github.com/ampproject/amp-wp/graphs/contributors * Version: 2.5.4-alpha * License: GPLv2 or later - * Requires at least: 5.3 + * Requires at least: 6.3 * Requires PHP: 7.4 * * @package AMP diff --git a/assets/src/block-editor/components/amp-preview-button.js b/assets/src/block-editor/components/amp-preview-button.js index 303cf855476..e2295f2e1e6 100644 --- a/assets/src/block-editor/components/amp-preview-button.js +++ b/assets/src/block-editor/components/amp-preview-button.js @@ -16,8 +16,7 @@ import { __ } from '@wordpress/i18n'; * Internal dependencies */ import { isAMPEnabled } from '../helpers'; -import ampFilledIcon from '../../../images/amp-icon.svg'; -import ampBlackIcon from '../../../images/amp-black-icon.svg'; +import { AMPFilledIcon, AMPBlackIcon } from '../../icons'; /** * Writes the message and graphic in the new preview window that was opened. @@ -30,7 +29,7 @@ import ampBlackIcon from '../../../images/amp-black-icon.svg'; function writeInterstitialMessage(targetDocument) { let markup = renderToString(
- + } />

{__('Generating AMP preview…', 'amp')}

); @@ -231,11 +230,7 @@ class AmpPreviewButton extends Component { onClick={this.openPreviewWindow} ref={this.buttonRef} > - {ampFilledIcon({ - viewBox: '0 0 62 62', - width: 18, - height: 18, - })} + { /* translators: accessibility text */ diff --git a/assets/src/block-editor/helpers/test/addAMPAttributes.js b/assets/src/block-editor/helpers/test/addAMPAttributes.js index 7297a3be30e..9d6724f334f 100644 --- a/assets/src/block-editor/helpers/test/addAMPAttributes.js +++ b/assets/src/block-editor/helpers/test/addAMPAttributes.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/block-editor/store/test/selectors.js b/assets/src/block-editor/store/test/selectors.js index 8d787bbd523..a931fb996b3 100644 --- a/assets/src/block-editor/store/test/selectors.js +++ b/assets/src/block-editor/store/test/selectors.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/block-validation/components/amp-document-status/index.js b/assets/src/block-validation/components/amp-document-status/index.js index d38996a5534..772aca99e19 100644 --- a/assets/src/block-validation/components/amp-document-status/index.js +++ b/assets/src/block-validation/components/amp-document-status/index.js @@ -8,8 +8,7 @@ import { useDispatch, useSelect } from '@wordpress/data'; /** * Internal dependencies */ -import AMPValidationErrorsKeptIcon from '../../../../images/amp-validation-errors-kept.svg'; -import BellIcon from '../../../../images/bell-icon.svg'; +import { BellIcon, AMPValidationErrorsKeptIcon } from '../../../icons'; import { store as blockValidationStore } from '../../store'; import { StatusIcon } from '../icon'; import { SidebarNotification } from '../sidebar-notification'; diff --git a/assets/src/block-validation/components/amp-document-status/test/amp-document-status-notification.js b/assets/src/block-validation/components/amp-document-status/test/amp-document-status-notification.js index bdaa6d94383..a0aa33f7e76 100644 --- a/assets/src/block-validation/components/amp-document-status/test/amp-document-status-notification.js +++ b/assets/src/block-validation/components/amp-document-status/test/amp-document-status-notification.js @@ -2,6 +2,7 @@ * External dependencies */ import { render, fireEvent } from '@testing-library/react'; +import { beforeAll, describe, expect, it, jest } from '@jest/globals'; /** * WordPress dependencies diff --git a/assets/src/block-validation/components/amp-toggle/test/amp-toggle.js b/assets/src/block-validation/components/amp-toggle/test/amp-toggle.js index 248e3c1a961..de542fd023c 100644 --- a/assets/src/block-validation/components/amp-toggle/test/amp-toggle.js +++ b/assets/src/block-validation/components/amp-toggle/test/amp-toggle.js @@ -2,6 +2,7 @@ * External dependencies */ import { render, fireEvent } from '@testing-library/react'; +import { beforeEach, describe, expect, it, jest } from '@jest/globals'; /** * Internal dependencies diff --git a/assets/src/block-validation/components/amp-validation-status/revalidate-notification.js b/assets/src/block-validation/components/amp-validation-status/revalidate-notification.js index 32f11fdd3d2..24eb1b55598 100644 --- a/assets/src/block-validation/components/amp-validation-status/revalidate-notification.js +++ b/assets/src/block-validation/components/amp-validation-status/revalidate-notification.js @@ -9,7 +9,7 @@ import { useDispatch, useSelect } from '@wordpress/data'; * Internal dependencies */ import { store as blockValidationStore } from '../../store'; -import BellIcon from '../../../../images/bell-icon.svg'; +import { BellIcon } from '../../../icons'; import { SidebarNotification } from '../sidebar-notification'; import { useErrorsFetchingStateChanges } from '../../hooks/use-errors-fetching-state-changes'; diff --git a/assets/src/block-validation/components/amp-validation-status/status-notification.js b/assets/src/block-validation/components/amp-validation-status/status-notification.js index 93cf7aa4c47..217740418fe 100644 --- a/assets/src/block-validation/components/amp-validation-status/status-notification.js +++ b/assets/src/block-validation/components/amp-validation-status/status-notification.js @@ -8,7 +8,7 @@ import { useDispatch, useSelect } from '@wordpress/data'; /** * Internal dependencies */ -import AMPValidationErrorsKeptIcon from '../../../../images/amp-validation-errors-kept.svg'; +import { AMPValidationErrorsKeptIcon } from '../../../icons'; import { store as blockValidationStore } from '../../store'; import { StatusIcon } from '../icon'; import { SidebarNotification } from '../sidebar-notification'; diff --git a/assets/src/block-validation/components/amp-validation-status/test/__snapshots__/revalidate-notification.js.snap b/assets/src/block-validation/components/amp-validation-status/test/__snapshots__/revalidate-notification.js.snap index 6a03d66f168..228624af6e7 100644 --- a/assets/src/block-validation/components/amp-validation-status/test/__snapshots__/revalidate-notification.js.snap +++ b/assets/src/block-validation/components/amp-validation-status/test/__snapshots__/revalidate-notification.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`AMPRevalidateNotification always renders revalidate status message if there are active meta boxes 1`] = `""`; +exports[`AMPRevalidateNotification always renders revalidate status message if there are active meta boxes 1`] = `""`; -exports[`AMPRevalidateNotification renders revalidate message if draft post is dirty 1`] = `""`; +exports[`AMPRevalidateNotification renders revalidate message if draft post is dirty 1`] = `""`; -exports[`AMPRevalidateNotification renders revalidate message if post is dirty 1`] = `""`; +exports[`AMPRevalidateNotification renders revalidate message if post is dirty 1`] = `""`; diff --git a/assets/src/block-validation/components/amp-validation-status/test/__snapshots__/status-notification.js.snap b/assets/src/block-validation/components/amp-validation-status/test/__snapshots__/status-notification.js.snap index 0c8cfa612e2..360c7551683 100644 --- a/assets/src/block-validation/components/amp-validation-status/test/__snapshots__/status-notification.js.snap +++ b/assets/src/block-validation/components/amp-validation-status/test/__snapshots__/status-notification.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`AMPValidationStatusNotification renders error message when API request error is present 1`] = `""`; +exports[`AMPValidationStatusNotification renders error message when API request error is present 1`] = `""`; -exports[`AMPValidationStatusNotification renders error message when there are kept issues 1`] = `""`; +exports[`AMPValidationStatusNotification renders error message when there are kept issues 1`] = `""`; -exports[`AMPValidationStatusNotification renders message when the post is new 1`] = `""`; +exports[`AMPValidationStatusNotification renders message when the post is new 1`] = `""`; -exports[`AMPValidationStatusNotification renders message when there are no AMP validation errors 1`] = `""`; +exports[`AMPValidationStatusNotification renders message when there are no AMP validation errors 1`] = `""`; -exports[`AMPValidationStatusNotification renders message when there are reviewed issues 1`] = `""`; +exports[`AMPValidationStatusNotification renders message when there are reviewed issues 1`] = `""`; -exports[`AMPValidationStatusNotification renders message when there are unreviewed issues 1`] = `""`; +exports[`AMPValidationStatusNotification renders message when there are unreviewed issues 1`] = `""`; diff --git a/assets/src/block-validation/components/amp-validation-status/test/revalidate-notification.js b/assets/src/block-validation/components/amp-validation-status/test/revalidate-notification.js index e5e993f4d15..1bd45f9d52a 100644 --- a/assets/src/block-validation/components/amp-validation-status/test/revalidate-notification.js +++ b/assets/src/block-validation/components/amp-validation-status/test/revalidate-notification.js @@ -2,6 +2,14 @@ * External dependencies */ import { render, fireEvent } from '@testing-library/react'; +import { + beforeAll, + beforeEach, + describe, + expect, + it, + jest, +} from '@jest/globals'; /** * WordPress dependencies diff --git a/assets/src/block-validation/components/amp-validation-status/test/status-notification.js b/assets/src/block-validation/components/amp-validation-status/test/status-notification.js index 22c207543a8..b3409fe4af0 100644 --- a/assets/src/block-validation/components/amp-validation-status/test/status-notification.js +++ b/assets/src/block-validation/components/amp-validation-status/test/status-notification.js @@ -2,6 +2,7 @@ * External dependencies */ import { render, fireEvent } from '@testing-library/react'; +import { beforeAll, describe, expect, it, jest } from '@jest/globals'; /** * WordPress dependencies diff --git a/assets/src/block-validation/components/error/error-content.js b/assets/src/block-validation/components/error/error-content.js index 0db1d6739c0..7b45faf8b0c 100644 --- a/assets/src/block-validation/components/error/error-content.js +++ b/assets/src/block-validation/components/error/error-content.js @@ -19,8 +19,7 @@ import { BlockIcon } from '@wordpress/block-editor'; /** * Internal dependencies */ -import AMPAlert from '../../../../images/amp-alert.svg'; -import AMPDelete from '../../../../images/amp-delete.svg'; +import { AMPAlert, AMPDelete } from '../../../icons'; import { getErrorSourceTitle } from './get-error-source-title'; /** diff --git a/assets/src/block-validation/components/error/error-type-icon.js b/assets/src/block-validation/components/error/error-type-icon.js index dcc47899c0b..21a88448477 100644 --- a/assets/src/block-validation/components/error/error-type-icon.js +++ b/assets/src/block-validation/components/error/error-type-icon.js @@ -12,9 +12,7 @@ import { /** * Internal dependencies */ -import HTMLErrorIcon from '../../../../images/amp-html-error-icon.svg'; -import JSErrorIcon from '../../../../images/amp-js-error-icon.svg'; -import CSSErrorIcon from '../../../../images/amp-css-error-icon.svg'; +import { JSErrorIcon, HTMLErrorIcon, CSSErrorIcon } from '../../../icons'; /** * Component rendering an icon representing JS, CSS, or HTML. diff --git a/assets/src/block-validation/components/error/test/error.js b/assets/src/block-validation/components/error/test/error.js index af96399d54a..4100d952569 100644 --- a/assets/src/block-validation/components/error/test/error.js +++ b/assets/src/block-validation/components/error/test/error.js @@ -9,6 +9,7 @@ import { VALIDATION_ERROR_NEW_ACCEPTED_STATUS, VALIDATION_ERROR_NEW_REJECTED_STATUS, } from 'amp-block-validation'; +import { beforeAll, describe, expect, it } from '@jest/globals'; /** * WordPress dependencies diff --git a/assets/src/block-validation/components/error/test/get-error-source-title.js b/assets/src/block-validation/components/error/test/get-error-source-title.js index 44aaa56ecf2..38edd3b8e95 100644 --- a/assets/src/block-validation/components/error/test/get-error-source-title.js +++ b/assets/src/block-validation/components/error/test/get-error-source-title.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/block-validation/components/icon/index.js b/assets/src/block-validation/components/icon/index.js index ffa19ef14bf..31e077fcbe2 100644 --- a/assets/src/block-validation/components/icon/index.js +++ b/assets/src/block-validation/components/icon/index.js @@ -7,9 +7,11 @@ import PropTypes from 'prop-types'; * Internal dependencies */ import './style.css'; -import AMPLogoIcon from '../../../../images/amp-logo-icon.svg'; -import AMPToolbarIcon from '../../../../images/amp-icon-toolbar.svg'; -import AMPToolbarIconBroken from '../../../../images/amp-toolbar-icon-broken.svg'; +import { + AMPLogoIcon, + AMPToolbarIcon, + AMPToolbarIconBroken, +} from '../../../icons'; /** * Plugin icon. diff --git a/assets/src/block-validation/components/icon/test/icon.js b/assets/src/block-validation/components/icon/test/icon.js index 6dd0f33e614..8cc63479852 100644 --- a/assets/src/block-validation/components/icon/test/icon.js +++ b/assets/src/block-validation/components/icon/test/icon.js @@ -2,6 +2,7 @@ * External dependencies */ import { render } from '@testing-library/react'; +import { describe, expect, it } from '@jest/globals'; /** * Internal dependencies diff --git a/assets/src/block-validation/components/sidebar-notification/test/sidebar-notification.js b/assets/src/block-validation/components/sidebar-notification/test/sidebar-notification.js index 3afe9f02c19..5c1eb3de455 100644 --- a/assets/src/block-validation/components/sidebar-notification/test/sidebar-notification.js +++ b/assets/src/block-validation/components/sidebar-notification/test/sidebar-notification.js @@ -2,6 +2,7 @@ * External dependencies */ import { render } from '@testing-library/react'; +import { describe, expect, it } from '@jest/globals'; /** * Internal dependencies diff --git a/assets/src/block-validation/components/sidebar-notification/test/sidebar-notifications-container.js b/assets/src/block-validation/components/sidebar-notification/test/sidebar-notifications-container.js index 79a04608446..ccaed8354ca 100644 --- a/assets/src/block-validation/components/sidebar-notification/test/sidebar-notifications-container.js +++ b/assets/src/block-validation/components/sidebar-notification/test/sidebar-notifications-container.js @@ -2,6 +2,7 @@ * External dependencies */ import { render } from '@testing-library/react'; +import { describe, expect, it } from '@jest/globals'; /** * Internal dependencies diff --git a/assets/src/block-validation/components/with-amp-toolbar-button/test/add-toolbar-button-to-block.js b/assets/src/block-validation/components/with-amp-toolbar-button/test/add-toolbar-button-to-block.js index 657f200732f..d26fbad3fd2 100644 --- a/assets/src/block-validation/components/with-amp-toolbar-button/test/add-toolbar-button-to-block.js +++ b/assets/src/block-validation/components/with-amp-toolbar-button/test/add-toolbar-button-to-block.js @@ -3,6 +3,7 @@ */ import { render } from '@testing-library/react'; import { noop } from 'lodash'; +import { beforeAll, describe, expect, it, jest } from '@jest/globals'; /** * WordPress dependencies diff --git a/assets/src/block-validation/hooks/test/use-amp-document-toggle.js b/assets/src/block-validation/hooks/test/use-amp-document-toggle.js index a03678143f4..01d9eb51cb3 100644 --- a/assets/src/block-validation/hooks/test/use-amp-document-toggle.js +++ b/assets/src/block-validation/hooks/test/use-amp-document-toggle.js @@ -2,6 +2,7 @@ * External dependencies */ import { render, fireEvent } from '@testing-library/react'; +import { beforeAll, describe, expect, it, jest } from '@jest/globals'; /** * WordPress dependencies diff --git a/assets/src/block-validation/hooks/test/use-errors-fetching-state-changes.js b/assets/src/block-validation/hooks/test/use-errors-fetching-state-changes.js index cfa445e150a..c342596787b 100644 --- a/assets/src/block-validation/hooks/test/use-errors-fetching-state-changes.js +++ b/assets/src/block-validation/hooks/test/use-errors-fetching-state-changes.js @@ -2,6 +2,7 @@ * External dependencies */ import { render } from '@testing-library/react'; +import { describe, expect, it, jest } from '@jest/globals'; /** * WordPress dependencies diff --git a/assets/src/block-validation/hooks/test/use-post-dirty-state-updates.js b/assets/src/block-validation/hooks/test/use-post-dirty-state-updates.js index 888b6ec7eb7..6268364f0a2 100644 --- a/assets/src/block-validation/hooks/test/use-post-dirty-state-updates.js +++ b/assets/src/block-validation/hooks/test/use-post-dirty-state-updates.js @@ -2,6 +2,7 @@ * External dependencies */ import { render, act } from '@testing-library/react'; +import { beforeAll, describe, expect, it, jest } from '@jest/globals'; /** * WordPress dependencies diff --git a/assets/src/block-validation/hooks/test/use-validation-error-state-updates.js b/assets/src/block-validation/hooks/test/use-validation-error-state-updates.js index 514c881ae0a..78fc8d24dce 100644 --- a/assets/src/block-validation/hooks/test/use-validation-error-state-updates.js +++ b/assets/src/block-validation/hooks/test/use-validation-error-state-updates.js @@ -2,6 +2,7 @@ * External dependencies */ import { render, waitFor } from '@testing-library/react'; +import { describe, expect, it, jest } from '@jest/globals'; /** * WordPress dependencies diff --git a/assets/src/block-validation/store/test/store.js b/assets/src/block-validation/store/test/store.js index 05a55441f24..3404241e8dc 100644 --- a/assets/src/block-validation/store/test/store.js +++ b/assets/src/block-validation/store/test/store.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * WordPress dependencies */ diff --git a/assets/src/common/helpers/test/enforceFileType.js b/assets/src/common/helpers/test/enforceFileType.js index dca79037adb..ce705e16cdf 100644 --- a/assets/src/common/helpers/test/enforceFileType.js +++ b/assets/src/common/helpers/test/enforceFileType.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/common/helpers/test/get-plugin-slug-from-file.js b/assets/src/common/helpers/test/get-plugin-slug-from-file.js index 6ca5e05c1e5..c2284c29461 100644 --- a/assets/src/common/helpers/test/get-plugin-slug-from-file.js +++ b/assets/src/common/helpers/test/get-plugin-slug-from-file.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/common/helpers/test/getMinimumFeaturedImageDimensions.js b/assets/src/common/helpers/test/getMinimumFeaturedImageDimensions.js index 2d74c25b622..2954d0037ed 100644 --- a/assets/src/common/helpers/test/getMinimumFeaturedImageDimensions.js +++ b/assets/src/common/helpers/test/getMinimumFeaturedImageDimensions.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/common/helpers/test/getNoticeTemplate.js b/assets/src/common/helpers/test/getNoticeTemplate.js index 9884b9471e0..5926eab2160 100644 --- a/assets/src/common/helpers/test/getNoticeTemplate.js +++ b/assets/src/common/helpers/test/getNoticeTemplate.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * WordPress dependencies */ diff --git a/assets/src/common/helpers/test/hasMinimumDimensions.js b/assets/src/common/helpers/test/hasMinimumDimensions.js index 81dc331adf9..f17e81d7cd6 100644 --- a/assets/src/common/helpers/test/hasMinimumDimensions.js +++ b/assets/src/common/helpers/test/hasMinimumDimensions.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/common/helpers/test/is-external-url.js b/assets/src/common/helpers/test/is-external-url.js index 82067a01509..03fa290c2a7 100644 --- a/assets/src/common/helpers/test/is-external-url.js +++ b/assets/src/common/helpers/test/is-external-url.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/common/helpers/test/isFileTypeAllowed.js b/assets/src/common/helpers/test/isFileTypeAllowed.js index 30de3b1cbb4..e58a8f3e4b8 100644 --- a/assets/src/common/helpers/test/isFileTypeAllowed.js +++ b/assets/src/common/helpers/test/isFileTypeAllowed.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/common/helpers/test/setImageFromURL.js b/assets/src/common/helpers/test/setImageFromURL.js index 693a9f69d3c..9e64692214e 100644 --- a/assets/src/common/helpers/test/setImageFromURL.js +++ b/assets/src/common/helpers/test/setImageFromURL.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/common/helpers/test/validateFeaturedImage.js b/assets/src/common/helpers/test/validateFeaturedImage.js index 68b817e6055..028f7d30cce 100644 --- a/assets/src/common/helpers/test/validateFeaturedImage.js +++ b/assets/src/common/helpers/test/validateFeaturedImage.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { describe, expect, it } from '@jest/globals'; + /** * Internal dependencies */ diff --git a/assets/src/components/amp-admin-notice/test/amp-admin-notice.js b/assets/src/components/amp-admin-notice/test/amp-admin-notice.js index a0de59ef945..c1cfa9ad79b 100644 --- a/assets/src/components/amp-admin-notice/test/amp-admin-notice.js +++ b/assets/src/components/amp-admin-notice/test/amp-admin-notice.js @@ -3,6 +3,7 @@ */ import { render, fireEvent } from '@testing-library/react'; import { create } from 'react-test-renderer'; +import { describe, expect, it, jest } from '@jest/globals'; /** * Internal dependencies diff --git a/assets/src/components/amp-info/test/index.js b/assets/src/components/amp-info/test/index.js index cb44d33fed1..54a09e8cf86 100644 --- a/assets/src/components/amp-info/test/index.js +++ b/assets/src/components/amp-info/test/index.js @@ -2,6 +2,7 @@ * External dependencies */ import { create } from 'react-test-renderer'; +import { describe, expect, it } from '@jest/globals'; /** * Internal dependencies diff --git a/assets/src/components/amp-notice/test/index.js b/assets/src/components/amp-notice/test/index.js index c6c1474105f..5eacc672012 100644 --- a/assets/src/components/amp-notice/test/index.js +++ b/assets/src/components/amp-notice/test/index.js @@ -3,6 +3,7 @@ */ import { render } from '@testing-library/react'; import { create } from 'react-test-renderer'; +import { describe, expect, it } from '@jest/globals'; /** * Internal dependencies diff --git a/assets/src/components/amp-setting-toggle/test/__snapshots__/index.js.snap b/assets/src/components/amp-setting-toggle/test/__snapshots__/index.js.snap index 4ac0c7ee352..4bb9bbd4566 100644 --- a/assets/src/components/amp-setting-toggle/test/__snapshots__/index.js.snap +++ b/assets/src/components/amp-setting-toggle/test/__snapshots__/index.js.snap @@ -11,7 +11,7 @@ exports[`AMPSettingToggle matches snapshots 1`] = ` className="components-base-control__field css-yj91it-StyledField ej5x27r3" >
@@ -33,7 +33,7 @@ exports[`AMPSettingToggle matches snapshots 1`] = ` />