Skip to content

Commit

Permalink
Migrate away from @testing-library/react-hooks (#10415)
Browse files Browse the repository at this point in the history
* chore: use patch-package to port renderHook to RTL v12

* chore: remove @testing-library/react-hooks dev dependency

* fix: update useFragment.test.tsx renderHook import

* fix: update useMutation.test.tsx

* fix: update useSubscription.test.tsx

* fix: update useLazyQuery.test.tsx

* fix: run mockSubscriptionLink, Mutation, ssr/server, and Subscription tests in React 18

* fix: run useReactiveVar test in React 18

* wip: useQuery

* fix: update useQuery.test.tsx

* fix: un-skip test in useMutation.test.tsx

* fix: comment out RenderResult import until remaining two tests are fixed

* fix(review): remove unused updates variable from useQuery test

* fix(review): return value inside waitFor, fix whitespace

* fix(review): use wait and tick utils

* fix(review): fix remaining test in useLazyQuery.test.tsx

* fix(review): fix failing test in useQuery.test.tsx

* fix(review): refactor two last tests in useQuery.test.tsx
  • Loading branch information
alessbell authored Jan 9, 2023
1 parent 1d5be2b commit 1b694f1
Show file tree
Hide file tree
Showing 12 changed files with 2,072 additions and 1,291 deletions.
12 changes: 1 addition & 11 deletions config/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ const react18TestFileIgnoreList = [
// to avoid running them twice with both react versions
// since they do not import react
ignoreTSFiles,
// failing subscriptionLink test (1)
'src/testing/react/__tests__/mockSubscriptionLink.test.tsx',
// failing hoc tests (8)
'src/react/hoc/__tests__/mutations/queries.test.tsx',
'src/react/hoc/__tests__/mutations/recycled-queries.test.tsx',
Expand All @@ -41,15 +39,7 @@ const react18TestFileIgnoreList = [
'src/react/hoc/__tests__/queries/observableQuery.test.tsx',
'src/react/hoc/__tests__/queries/skip.test.tsx',
'src/react/hoc/__tests__/subscriptions/subscriptions.test.tsx',
// failing hooks tests (4)
'src/react/hooks/__tests__/useMutation.test.tsx',
'src/react/hooks/__tests__/useQuery.test.tsx',
'src/react/hooks/__tests__/useReactiveVar.test.tsx',
'src/react/hooks/__tests__/useSubscription.test.tsx',
// failing components tests (4)
'src/react/components/__tests__/ssr/server.test.tsx',
'src/react/components/__tests__/client/Subscription.test.tsx',
'src/react/components/__tests__/client/Mutation.test.tsx',
// failing components tests (1)
'src/react/components/__tests__/client/Query.test.tsx',
];

Expand Down
Loading

0 comments on commit 1b694f1

Please sign in to comment.