Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Update to React 18
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Apr 22, 2024
1 parent c61e641 commit 5f1fb12
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 16 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"@matrix-org/matrix-wysiwyg": "2.17.0",
"@matrix-org/react-sdk-module-api": "^2.4.0",
"@sentry/browser": "^7.0.0",
"@testing-library/react-hooks": "^8.0.1",
"await-lock": "^2.1.0",
"blurhash": "^2.0.3",
"classnames": "^2.2.6",
Expand Down Expand Up @@ -107,10 +106,10 @@
"posthog-js": "1.126.0",
"qrcode": "1.5.3",
"re-resizable": "^6.9.0",
"react": "17.0.2",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.0",
"react-blurhash": "^0.3.0",
"react-dom": "17.0.2",
"react-dom": "^18.2.0",
"react-focus-lock": "^2.5.1",
"react-transition-group": "^4.4.1",
"rfc4648": "^1.4.0",
Expand Down Expand Up @@ -152,7 +151,7 @@
"@casualbot/jest-sonar-reporter": "2.2.7",
"@peculiar/webcrypto": "^1.4.3",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^12.1.5",
"@testing-library/react": "^14",
"@testing-library/user-event": "^14.4.3",
"@types/commonmark": "^0.27.4",
"@types/counterpart": "^0.18.1",
Expand Down
2 changes: 1 addition & 1 deletion test/hooks/useDebouncedCallback-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

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

import { useDebouncedCallback } from "../../src/hooks/spotlight/useDebouncedCallback";

Expand Down
4 changes: 2 additions & 2 deletions test/hooks/useLatestResult-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

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

import { useLatestResult } from "../../src/hooks/useLatestResult";

Expand All @@ -28,7 +28,7 @@ beforeEach(() => {
});

function simulateRequest(
hookResult: RenderHookResult<typeof useLatestResult, ReturnType<typeof useLatestResult>>["result"],
hookResult: RenderHookResult<ReturnType<typeof useLatestResult>, typeof useLatestResult>["result"],
{ id, delayInMs, result }: { id: string; delayInMs: number; result: string },
) {
const [setQuery, setResult] = hookResult.current;
Expand Down
3 changes: 1 addition & 2 deletions test/hooks/useProfileInfo-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { waitFor } from "@testing-library/react";
import { renderHook, act } from "@testing-library/react-hooks/dom";
import { waitFor, renderHook, act } from "@testing-library/react";
import { MatrixClient } from "matrix-js-sdk/src/matrix";

import { useProfileInfo } from "../../src/hooks/useProfileInfo";
Expand Down
3 changes: 1 addition & 2 deletions test/hooks/usePublicRoomDirectory-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { waitFor } from "@testing-library/react";
import { renderHook, act } from "@testing-library/react-hooks/dom";
import { waitFor, renderHook, act } from "@testing-library/react";
import { IRoomDirectoryOptions, MatrixClient } from "matrix-js-sdk/src/matrix";

import { usePublicRoomDirectory } from "../../src/hooks/usePublicRoomDirectory";
Expand Down
3 changes: 1 addition & 2 deletions test/hooks/useSlidingSyncRoomSearch-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { waitFor } from "@testing-library/react";
import { renderHook, act } from "@testing-library/react-hooks/dom";
import { waitFor, renderHook, act } from "@testing-library/react";
import { mocked } from "jest-mock";
import { SlidingSync } from "matrix-js-sdk/src/sliding-sync";
import { Room } from "matrix-js-sdk/src/matrix";
Expand Down
3 changes: 1 addition & 2 deletions test/hooks/useUserDirectory-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { waitFor } from "@testing-library/react";
import { renderHook, act } from "@testing-library/react-hooks/dom";
import { waitFor, renderHook, act } from "@testing-library/react";
import { MatrixClient } from "matrix-js-sdk/src/matrix";

import { useUserDirectory } from "../../src/hooks/useUserDirectory";
Expand Down
2 changes: 1 addition & 1 deletion test/hooks/useUserOnboardingTasks-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

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

import { useUserOnboardingTasks } from "../../src/hooks/useUserOnboardingTasks";

Expand Down

0 comments on commit 5f1fb12

Please sign in to comment.