Skip to content

Commit

Permalink
chore(auth): fix test with new apollo types
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurapov committed Oct 31, 2024
1 parent 9ed0253 commit 34fc0b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/auth/src/graphql/resolvers/grant.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ describe('Grant Resolvers', (): void => {
} catch (error) {
assert.ok(error instanceof ApolloError)
expect(error.message).toBe('No grant')
expect(error.graphQLErrors[0].extensions.code).toEqual(
expect(error.graphQLErrors[0].extensions?.code).toEqual(
GraphQLErrorCode.NotFound
)
}
Expand Down Expand Up @@ -590,7 +590,7 @@ describe('Grant Resolvers', (): void => {
} catch (error) {
assert.ok(error instanceof ApolloError)
expect(error.message).toBe('Grant id is not provided')
expect(error.graphQLErrors[0].extensions.code).toEqual(
expect(error.graphQLErrors[0].extensions?.code).toEqual(
GraphQLErrorCode.Forbidden
)
}
Expand Down Expand Up @@ -626,7 +626,7 @@ describe('Grant Resolvers', (): void => {
} catch (error) {
assert.ok(error instanceof ApolloError)
expect(error.message).toBe('Revoke grant was not successful')
expect(error.graphQLErrors[0].extensions.code).toEqual(
expect(error.graphQLErrors[0].extensions?.code).toEqual(
GraphQLErrorCode.NotFound
)
}
Expand Down Expand Up @@ -662,7 +662,7 @@ describe('Grant Resolvers', (): void => {
})
} catch (error) {
assert.ok(error instanceof ApolloError)
expect(error.graphQLErrors[0].extensions.code).toEqual(
expect(error.graphQLErrors[0].extensions?.code).toEqual(
GraphQLErrorCode.InternalServerError
)
}
Expand Down

0 comments on commit 34fc0b1

Please sign in to comment.