Skip to content

Commit 7a4bec9

Browse files
authored
Merge pull request #1287 from visualize-admin/chore/update-testing-libraries
chore: Update @testing-library
2 parents 484475f + 34a3c1e commit 7a4bec9

File tree

9 files changed

+236
-59
lines changed

9 files changed

+236
-59
lines changed

app/charts/map/helpers.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderHook } from "@testing-library/react-hooks";
1+
import { renderHook } from "@testing-library/react";
22

33
import { BBox } from "@/config-types";
44

@@ -22,8 +22,8 @@ const featuresBBox = [
2222
describe("useViewState", () => {
2323
it("should properly set defaultViewState", () => {
2424
const { result, rerender } = renderHook<
25-
ViewStateInitializationProps,
26-
ReturnType<typeof useViewState>
25+
ReturnType<typeof useViewState>,
26+
ViewStateInitializationProps
2727
>((props: ViewStateInitializationProps) => useViewState(props), {
2828
initialProps: {
2929
width,
@@ -49,8 +49,8 @@ describe("useViewState", () => {
4949

5050
it("should properly set viewState", () => {
5151
const { result } = renderHook<
52-
ViewStateInitializationProps,
53-
ReturnType<typeof useViewState>
52+
ReturnType<typeof useViewState>,
53+
ViewStateInitializationProps
5454
>((props: ViewStateInitializationProps) => useViewState(props), {
5555
initialProps: {
5656
width,
@@ -66,8 +66,8 @@ describe("useViewState", () => {
6666
);
6767

6868
const { result: resultLocked } = renderHook<
69-
ViewStateInitializationProps,
70-
ReturnType<typeof useViewState>
69+
ReturnType<typeof useViewState>,
70+
ViewStateInitializationProps
7171
>((props: ViewStateInitializationProps) => useViewState(props), {
7272
initialProps: {
7373
width,

app/charts/shared/use-observation-labels.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderHook } from "@testing-library/react-hooks";
1+
import { renderHook } from "@testing-library/react";
22

33
import { useObservationLabels } from "@/charts/shared/observation-labels";
44
import { Observation } from "@/domain/data";

app/components/use-redirect-to-versioned-cube.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderHook } from "@testing-library/react-hooks";
1+
import { renderHook } from "@testing-library/react";
22
import { NextRouter, useRouter } from "next/router";
33

44
import { useLocale } from "@/locales/use-locale";

app/configurator/use-filter-changes.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderHook } from "@testing-library/react-hooks";
1+
import { renderHook } from "@testing-library/react";
22
import merge from "lodash/merge";
33

44
import { Filters } from "@/config-types";

app/domain/datasource/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { act, renderHook } from "@testing-library/react-hooks";
1+
import { act, renderHook } from "@testing-library/react";
22
import mittEmitter from "next/dist/shared/lib/mitt";
33
import { SingletonRouter } from "next/router";
44

app/formatters.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderHook } from "@testing-library/react-hooks";
1+
import { renderHook } from "@testing-library/react";
22

33
import {
44
getTimeIntervalFormattedSelectOptions,

app/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@
145145
"@playwright-testing-library/test": "^4.5.0",
146146
"@playwright/test": "^1.32.1",
147147
"@svgr/cli": "^5.5.0",
148-
"@testing-library/react": "^12.1.2",
149-
"@testing-library/react-hooks": "^7.0.2",
148+
"@testing-library/react": "^14.1.2",
150149
"@types/autosuggest-highlight": "^3.2.0",
151150
"@types/clownface": "^1.0.3",
152151
"@types/cors": "^2.8.8",

app/utils/router/use-route-state.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { act, renderHook } from "@testing-library/react-hooks";
1+
import { act, renderHook } from "@testing-library/react";
22
import mittEmitter from "next/dist/shared/lib/mitt";
33
import { useRouter } from "next/router";
44

0 commit comments

Comments
 (0)