From 6d1f0874fc9ded28aa55d010944b976e3fdbf668 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Wed, 21 Dec 2022 17:06:39 +0100 Subject: [PATCH] Block Directory: enable fake timers where needed --- .../src/components/downloadable-block-list-item/test/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/block-directory/src/components/downloadable-block-list-item/test/index.js b/packages/block-directory/src/components/downloadable-block-list-item/test/index.js index d2939624fab68e..3e22334aeb6a6d 100644 --- a/packages/block-directory/src/components/downloadable-block-list-item/test/index.js +++ b/packages/block-directory/src/components/downloadable-block-list-item/test/index.js @@ -15,6 +15,8 @@ import { useSelect } from '@wordpress/data'; import DownloadableBlockListItem from '../'; import { plugin } from '../../test/fixtures'; +jest.useFakeTimers(); + jest.mock( '@wordpress/data/src/components/use-select', () => { // This allows us to tweak the returned value on each test. const mock = jest.fn();