fix some test console errors

The react testing library prints errors to the console about not using
act(). This adds fixes/workarounds for most cases.
This commit is contained in:
David Lechner
2023-05-17 16:33:47 -05:00
committed by David Lechner
parent bf4670b25d
commit c733881815
6 changed files with 51 additions and 11 deletions
+5 -1
View File
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2020-2022 The Pybricks Authors
// Copyright (c) 2020-2023 The Pybricks Authors
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
@@ -15,6 +15,10 @@ import {
} from '@blueprintjs/core/lib/cjs/components/hotkeys/hotkeyParser';
// @ts-expect-error no typings
import matchMediaPolyfill from 'mq-polyfill';
import { config } from 'react-transition-group';
// avoid react testing library errors about not using act()
config.disabled = true;
jest.mock('./fileStorage/hooks');