MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeTest

Function makeTest

packages/effect/src/graphql/GraphQLClient.ts:842–852  ·  view source on GitHub ↗
(group: GraphQLGroup.GraphQLGroup<Ops>)

Source from the content-addressed store, hash-verified

840 */
841export const makeTest =
842 <Ops extends GraphQL.Any>(group: GraphQLGroup.GraphQLGroup<Ops>) =>
843 (handlers: TestHandlers<Ops>): GraphQLClient<Ops> => {
844 // Type boundary: the mapped type keys handlers by name, which a lookup by a
845 // runtime name cannot follow.
846 const byName = handlers as Record<string, TestHandler<Ops> | undefined>
847 return fromGroup(
848 group,
849 (operation) =>
850 makeTestMethod(operation, Object.hasOwn(byName, operation.name) ? byName[operation.name] : undefined)
851 )
852 }
853
854/**
855 * Builds a mock layer for a client service using {@link makeTest}. Bind the

Callers 1

layerTestFunction · 0.85

Calls 2

makeTestMethodFunction · 0.85
fromGroupFunction · 0.70

Tested by

no test coverage detected