Skip to content

Commit 1b694f1

Browse files
authored
Migrate away from @testing-library/react-hooks (apollographql#10415)
* 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
1 parent 1d5be2b commit 1b694f1

12 files changed

Lines changed: 2072 additions & 1291 deletions

config/jest.config.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ const react18TestFileIgnoreList = [
3030
// to avoid running them twice with both react versions
3131
// since they do not import react
3232
ignoreTSFiles,
33-
// failing subscriptionLink test (1)
34-
'src/testing/react/__tests__/mockSubscriptionLink.test.tsx',
3533
// failing hoc tests (8)
3634
'src/react/hoc/__tests__/mutations/queries.test.tsx',
3735
'src/react/hoc/__tests__/mutations/recycled-queries.test.tsx',
@@ -41,15 +39,7 @@ const react18TestFileIgnoreList = [
4139
'src/react/hoc/__tests__/queries/observableQuery.test.tsx',
4240
'src/react/hoc/__tests__/queries/skip.test.tsx',
4341
'src/react/hoc/__tests__/subscriptions/subscriptions.test.tsx',
44-
// failing hooks tests (4)
45-
'src/react/hooks/__tests__/useMutation.test.tsx',
46-
'src/react/hooks/__tests__/useQuery.test.tsx',
47-
'src/react/hooks/__tests__/useReactiveVar.test.tsx',
48-
'src/react/hooks/__tests__/useSubscription.test.tsx',
49-
// failing components tests (4)
50-
'src/react/components/__tests__/ssr/server.test.tsx',
51-
'src/react/components/__tests__/client/Subscription.test.tsx',
52-
'src/react/components/__tests__/client/Mutation.test.tsx',
42+
// failing components tests (1)
5343
'src/react/components/__tests__/client/Query.test.tsx',
5444
];
5545

0 commit comments

Comments
 (0)