From d9e798f0c4b53351ac474a537eaa989b176d2447 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Tue, 17 Jan 2023 16:16:59 +0800 Subject: [PATCH] Remove jest advance timers --- packages/block-library/src/cover/test/block-controls.js | 2 +- packages/block-library/src/cover/test/edit.js | 4 ++-- packages/block-library/src/cover/test/inspector-controls.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/block-library/src/cover/test/block-controls.js b/packages/block-library/src/cover/test/block-controls.js index e2fe662eb7ac9d..272322a8f9ea78 100644 --- a/packages/block-library/src/cover/test/block-controls.js +++ b/packages/block-library/src/cover/test/block-controls.js @@ -20,7 +20,7 @@ import CoverBlockControls from '../edit/block-controls'; function setup( jsx ) { return { - user: userEvent.setup( { advanceTimers: jest.advanceTimersByTime } ), + user: userEvent.setup(), ...render( jsx ), }; } diff --git a/packages/block-library/src/cover/test/edit.js b/packages/block-library/src/cover/test/edit.js index f38dc0491053e4..4be093a287e725 100644 --- a/packages/block-library/src/cover/test/edit.js +++ b/packages/block-library/src/cover/test/edit.js @@ -36,7 +36,7 @@ import metadata from '../block.json'; function setup( jsx ) { return { - user: userEvent.setup( { advanceTimers: jest.advanceTimersByTime } ), + user: userEvent.setup(), ...render( jsx ), }; } @@ -117,7 +117,7 @@ describe( 'Cover edit', () => { } ) ); - expect( setOverlayColor ).toHaveBeenCalledWith( '#000000' ); + expect( setOverlayColor ).toHaveBeenCalledWith( '#000000', 0 ); } ); } ); } ); diff --git a/packages/block-library/src/cover/test/inspector-controls.js b/packages/block-library/src/cover/test/inspector-controls.js index 5cf3fbc3edfc0f..c9be3b39f3a4af 100644 --- a/packages/block-library/src/cover/test/inspector-controls.js +++ b/packages/block-library/src/cover/test/inspector-controls.js @@ -30,7 +30,7 @@ import CoverInspectorControls from '../edit/inspector-controls'; function setup( jsx ) { return { - user: userEvent.setup( { advanceTimers: jest.advanceTimersByTime } ), + user: userEvent.setup(), ...render( jsx ), }; }