Skip to content

Commit

Permalink
Update test dependencies and fix renderHook usages
Browse files Browse the repository at this point in the history
  • Loading branch information
jtomic-croz committed Feb 2, 2023
1 parent 9837e0b commit 7b03ea3
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 55 deletions.
7 changes: 7 additions & 0 deletions .changeset/hot-spoons-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@croz/nrich-form-configuration-core": patch
"@croz/nrich-notification-core": patch
"@croz/nrich-notification-mui": patch
---

Update test dependencies to be compatible with React 18
5 changes: 2 additions & 3 deletions libs/form-configuration/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
"@croz/nrich-jest-config": "*",
"@croz/nrich-tsconfig": "*",
"@croz/nrich-tsup-config": "*",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/react-hooks": "^8.0.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/jest": "^28.1.0",
"eslint": "^8.2.0",
"eslint-config-nrich": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*
*/

import { render, screen } from "@testing-library/react";
import { renderHook } from "@testing-library/react-hooks";
import { render, renderHook, screen } from "@testing-library/react";
import React from "react";
import { act } from "react-dom/test-utils";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*
*/

import { act } from "@testing-library/react";
import { renderHook } from "@testing-library/react-hooks";
import { act, renderHook } from "@testing-library/react";

import { useFormConfiguration, useYupFormConfiguration } from "../../src";
import { useFormConfigurationStore } from "../../src/store";
Expand Down
3 changes: 1 addition & 2 deletions libs/notification/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"@croz/nrich-jest-config": "*",
"@croz/nrich-tsconfig": "*",
"@croz/nrich-tsup-config": "*",
"@testing-library/react": "^13.3.0",
"@testing-library/react-hooks": "^8.0.0",
"@testing-library/react": "^13.4.0",
"@types/jest": "^28.1.0",
"axios": "^1.1.3",
"eslint": "^8.2.0",
Expand Down
3 changes: 1 addition & 2 deletions libs/notification/core/test/hook/use-notification.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*
*/

import { act } from "@testing-library/react";
import { renderHook } from "@testing-library/react-hooks";
import { act, renderHook } from "@testing-library/react";

import { Notification, useNotifications } from "../../src";
import { useNotificationStore } from "../../src/store";
Expand Down
4 changes: 2 additions & 2 deletions libs/notification/mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@emotion/styled": "^11.8.1",
"@mui/material": "^5.0.0",
"@testing-library/dom": "^8.13.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^28.1.0",
"eslint": "^8.2.0",
Expand Down
49 changes: 7 additions & 42 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,8 @@ __metadata:
"@croz/nrich-jest-config": "*"
"@croz/nrich-tsconfig": "*"
"@croz/nrich-tsup-config": "*"
"@testing-library/jest-dom": ^5.16.4
"@testing-library/react": ^13.3.0
"@testing-library/react-hooks": ^8.0.0
"@testing-library/jest-dom": ^5.16.5
"@testing-library/react": ^13.4.0
"@types/jest": ^28.1.0
eslint: ^8.2.0
eslint-config-nrich: "*"
Expand Down Expand Up @@ -736,8 +735,7 @@ __metadata:
"@croz/nrich-jest-config": "*"
"@croz/nrich-tsconfig": "*"
"@croz/nrich-tsup-config": "*"
"@testing-library/react": ^13.3.0
"@testing-library/react-hooks": ^8.0.0
"@testing-library/react": ^13.4.0
"@types/jest": ^28.1.0
axios: ^1.1.3
eslint: ^8.2.0
Expand Down Expand Up @@ -766,8 +764,8 @@ __metadata:
"@emotion/styled": ^11.8.1
"@mui/material": ^5.0.0
"@testing-library/dom": ^8.13.0
"@testing-library/jest-dom": ^5.16.4
"@testing-library/react": ^13.3.0
"@testing-library/jest-dom": ^5.16.5
"@testing-library/react": ^13.4.0
"@testing-library/user-event": ^13.5.0
"@types/jest": ^28.1.0
eslint: ^8.2.0
Expand Down Expand Up @@ -1661,7 +1659,7 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/jest-dom@npm:^5.16.4":
"@testing-library/jest-dom@npm:^5.16.5":
version: 5.16.5
resolution: "@testing-library/jest-dom@npm:5.16.5"
dependencies:
Expand All @@ -1678,29 +1676,7 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/react-hooks@npm:^8.0.0":
version: 8.0.1
resolution: "@testing-library/react-hooks@npm:8.0.1"
dependencies:
"@babel/runtime": ^7.12.5
react-error-boundary: ^3.1.0
peerDependencies:
"@types/react": ^16.9.0 || ^17.0.0
react: ^16.9.0 || ^17.0.0
react-dom: ^16.9.0 || ^17.0.0
react-test-renderer: ^16.9.0 || ^17.0.0
peerDependenciesMeta:
"@types/react":
optional: true
react-dom:
optional: true
react-test-renderer:
optional: true
checksum: 7fe44352e920deb5cb1876f80d64e48615232072c9d5382f1e0284b3aab46bb1c659a040b774c45cdf084a5257b8fe463f7e08695ad8480d8a15635d4d3d1f6d
languageName: node
linkType: hard

"@testing-library/react@npm:^13.3.0":
"@testing-library/react@npm:^13.4.0":
version: 13.4.0
resolution: "@testing-library/react@npm:13.4.0"
dependencies:
Expand Down Expand Up @@ -7376,17 +7352,6 @@ __metadata:
languageName: node
linkType: hard

"react-error-boundary@npm:^3.1.0":
version: 3.1.4
resolution: "react-error-boundary@npm:3.1.4"
dependencies:
"@babel/runtime": ^7.12.5
peerDependencies:
react: ">=16.13.1"
checksum: f36270a5d775a25c8920f854c0d91649ceea417b15b5bc51e270a959b0476647bb79abb4da3be7dd9a4597b029214e8fe43ea914a7f16fa7543c91f784977f1b
languageName: node
linkType: hard

"react-is@npm:^16.13.1, react-is@npm:^16.7.0":
version: 16.13.1
resolution: "react-is@npm:16.13.1"
Expand Down

0 comments on commit 7b03ea3

Please sign in to comment.