mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-15 11:04:49 +00:00
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:
committed by
David Lechner
parent
bf4670b25d
commit
c733881815
+5
-1
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user