(group: GraphQLGroup.GraphQLGroup<Ops>)
| 840 | */ |
| 841 | export 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 |
no test coverage detected