From 87258aad04b26f3447f7c9051d1474ec063202ea Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Mon, 29 Apr 2024 09:12:37 +0200 Subject: [PATCH] fix: use act from `react` instead of deprecated one https://react.dev/warnings/react-dom-test-utils --- biome.json | 3 +++ src/test-utils.ts | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/biome.json b/biome.json index 18c8ec44..0a2a7d1e 100644 --- a/biome.json +++ b/biome.json @@ -24,6 +24,9 @@ "complexity": { "noForEach": "off" }, + "style": { + "noVar": "off" + }, "a11y": { "noSvgWithoutTitle": "off" } diff --git a/src/test-utils.ts b/src/test-utils.ts index accd4ed0..0efc234e 100644 --- a/src/test-utils.ts +++ b/src/test-utils.ts @@ -1,6 +1,5 @@ -import { act } from "react-dom/test-utils"; +import { act } from "react"; declare global { - // biome-ignore lint/style/noVar: Needs to be `var`, not `let` or `const`, for typing to work var IS_REACT_ACT_ENVIRONMENT: boolean; } type Item = {