MCPcopy Create free account
hub / github.com/keystonejs/keystone / expectGraphQLValidationError

Function expectGraphQLValidationError

tests/api-tests/utils.ts:71–79  ·  view source on GitHub ↗
(
  errors: readonly any[] | undefined,
  args: { message: string }[]
)

Source from the content-addressed store, hash-verified

69}
70
71export function expectGraphQLValidationError (
72 errors: readonly any[] | undefined,
73 args: { message: string }[]
74) {
75 const unpackedErrors = unpackErrors(errors)
76 expect(unpackedErrors).toEqual(
77 args.map(({ message }) => ({ extensions: { code: 'GRAPHQL_VALIDATION_FAILED' }, message }))
78 )
79}
80
81export function expectAccessDenied (
82 errors: readonly any[] | undefined,

Callers 7

orderBy.test.tsFile · 0.90
limits.test.tsFile · 0.90
filters.test.tsFile · 0.90
set-many.test.tsFile · 0.90

Calls 1

unpackErrorsFunction · 0.85

Tested by

no test coverage detected