mirror of
https://github.com/apotdevin/thunderhub.git
synced 2026-08-16 13:00:46 +02:00
* chore: 🔧 add tests * fix: 🐛 network info resolver * feat: ✨ init tests * chore: 🔧 improve test * chore: 🔧 more tests * chore: 🔧 bitcoin resolvers * chore: 🔧 more tests
13 lines
400 B
TypeScript
13 lines
400 B
TypeScript
import {
|
|
createTestClient,
|
|
ApolloServerTestClient,
|
|
} from 'apollo-server-testing';
|
|
import { ApolloServer } from 'apollo-server';
|
|
import schema from 'server/schema';
|
|
import { ContextMock } from 'server/tests/testMocks';
|
|
|
|
export default function testServer(context?: any): ApolloServerTestClient {
|
|
return createTestClient(
|
|
new ApolloServer({ schema, context: context || ContextMock })
|
|
);
|
|
}
|