Skip to content

Commit

Permalink
Ignore ergonomock field alias errors
Browse files Browse the repository at this point in the history
  • Loading branch information
canac committed Nov 14, 2024
1 parent a8e7c7e commit c4b7e6b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/Tool/Appeal/InitialPage/Appeals.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ describe('AppealsTest', () => {
<SnackbarProvider>
<ThemeProvider theme={theme}>
<TestRouter router={router}>
<GqlMockedProvider<{ GetAppeals: GetAppealsQuery }> mocks={mocks}>
<GqlMockedProvider<{ GetAppeals: GetAppealsQuery }>
// @ts-expect-error graphql-ergonomock does not handle renamed fields correctly, so
// the mock field name doesn't match the query field name
mocks={mocks}
>
<Appeals accountListId={accountListId} />
</GqlMockedProvider>
</TestRouter>
Expand All @@ -95,7 +99,11 @@ describe('AppealsTest', () => {
<SnackbarProvider>
<ThemeProvider theme={theme}>
<TestRouter router={router}>
<GqlMockedProvider<{ GetAppeals: GetAppealsQuery }> mocks={mocks}>
<GqlMockedProvider<{ GetAppeals: GetAppealsQuery }>
// @ts-expect-error graphql-ergonomock does not handle renamed fields correctly, so
// the mock field name doesn't match the query field name
mocks={mocks}
>
<Appeals accountListId={accountListId} />
</GqlMockedProvider>
</TestRouter>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Tool/Home/ToolsHome.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const TestComponent: React.FC<TestComponentProps> = ({ setup = false }) => (
<GqlMockedProvider<{
GetToolNotifications: GetToolNotificationsQuery;
}>
// @ts-expect-error graphql-ergonomock does not handle renamed fields correctly, so
// the mock field name doesn't match the query field name
mocks={mocks}
>
<TestRouter
Expand Down
2 changes: 2 additions & 0 deletions src/components/Tool/NavToolList/NavToolList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const TestComponent = () => (
<GqlMockedProvider<{
GetToolNotifications: GetToolNotificationsQuery;
}>
// @ts-expect-error graphql-ergonomock does not handle renamed fields correctly, so
// the mock field name doesn't match the query field name
mocks={mocks}
>
<NavToolList toggle={toggleMock} isOpen={true} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ describe('UserPreferenceProvider', () => {
user: {
id: userId,
preferences: {
// @ts-expect-error graphql-ergonomock does not handle renamed fields correctly, so
// the mock field name doesn't match the query field name
localeDisplay: 'es',
},
},
Expand Down

0 comments on commit c4b7e6b

Please sign in to comment.