Skip to content

Commit f2679d4

Browse files
committed
feat: migrate act
1 parent f07b3b5 commit f2679d4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lib/queries/react/queries/useQuery.rq.test.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/* eslint-disable @typescript-eslint/ban-ts-comment */
1414
/* eslint-disable @typescript-eslint/promise-function-async */
1515
import { type Mock, describe, expect, expectTypeOf, it, test, vi } from "vitest"
16-
import { act, fireEvent, render, waitFor } from "@testing-library/react"
16+
import { fireEvent, render, waitFor } from "@testing-library/react"
1717
import { QueryCache } from "../../client/queries/cache/QueryCache"
1818
import {
1919
Blink,
@@ -34,7 +34,7 @@ import {
3434
type UseQueryOptions,
3535
type DefinedUseQueryResult
3636
} from "./types"
37-
import React from "react"
37+
import React, { act } from "react"
3838
import { keepPreviousData } from "../../client/utils/keepPreviousData"
3939
import { ErrorBoundary } from "react-error-boundary"
4040
import { noop } from "rxjs"

src/lib/utils/useLiveRef.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { act, renderHook } from "@testing-library/react"
1+
import { renderHook } from "@testing-library/react"
22
import { describe, expect, test } from "vitest"
33

44
import { useLiveRef } from "./useLiveRef"
5+
import { act } from "react"
56

67
describe("useLiveRef", () => {
78
test("should return a ref object with an initial value", () => {

0 commit comments

Comments
 (0)