From 8dbb012c1a5b48941fe7aef06c8e1d6e647bf158 Mon Sep 17 00:00:00 2001 From: David Ichim Date: Fri, 19 Feb 2021 17:44:58 +0200 Subject: [PATCH] Refs #126375 use waitFor as wait is deprecated and updated devDependencies for volto-slate --- package.json | 5 +++-- src/editor/ui/ToolbarButton.test.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index e73e628a..9a8cb404 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,9 @@ "weak-key": "^1.0.2" }, "devDependencies": { - "@testing-library/react": "9.5.0", - "@types/jest": "^25.2.3" + "@testing-library/react": "11.2.5", + "@testing-library/dom": "7.29.4", + "@types/jest": "26.0.20" }, "repository": { "type": "git", diff --git a/src/editor/ui/ToolbarButton.test.js b/src/editor/ui/ToolbarButton.test.js index d322f593..4ac4f710 100644 --- a/src/editor/ui/ToolbarButton.test.js +++ b/src/editor/ui/ToolbarButton.test.js @@ -1,7 +1,7 @@ import React from 'react'; import configureStore from 'redux-mock-store'; import { Provider } from 'react-intl-redux'; -import { wait, render } from '@testing-library/react'; +import { waitFor, render } from '@testing-library/react'; import ToolbarButton from './ToolbarButton'; @@ -20,7 +20,7 @@ describe('ToolbarButton', () => { , ); - await wait(() => { + await waitFor(() => { expect(asFragment()).toMatchSnapshot(); }); });