Skip to content

Commit

Permalink
Fix tests again
Browse files Browse the repository at this point in the history
  • Loading branch information
thesan committed Nov 23, 2023
1 parent fb250de commit dfa1d54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,14 @@ export default {
},
{
query: GetBackendMeDocument,
data: args.isAuthorized
? {
me: {
email: args.isEmailConfirmed ? email : null,
unverifiedEmail: args.isEmailConfirmed ? null : email,
receiveEmails: true,
name: 'test',
},
}
: undefined,
data: {
me: {
email: args.isEmailConfirmed ? email : null,
unverifiedEmail: args.isEmailConfirmed ? null : email,
receiveEmails: true,
name: 'test',
},
},
error: args.isAuthorized ? undefined : new Error('Unauthorized'),
},
],
Expand All @@ -110,13 +108,6 @@ export default {
},

backend: {
notificationsSettingsMap: args.isAuthorized
? {
[alice.id]: {
accessToken: 'token',
},
}
: {},
onSetMemberSettings: (...settingsArgs: any[]) => args.onSetMemberSettings(...settingsArgs),
authToken: SIGNIN_TOKEN,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/mocks/providers/gql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export const MockGqlProvider: FC<MockGqlProps> = ({ children, queries, mutations
const queriesMap = useMemo(
() =>
new Map(
queries?.map<[DocumentNode, Resolver]>(({ query, data, resolver }) => [
queries?.map<[DocumentNode, Resolver]>(({ query, data, error, resolver }) => [
query,
(options) => resolver?.(options) ?? { loading: false, data },
(options) => resolver?.(options) ?? { loading: false, data: error ? undefined : data, error },
]) ?? []
),
[queries]
Expand Down

0 comments on commit dfa1d54

Please sign in to comment.