thunderhub/server/tests/testServer.ts
Anthony Potdevin 581185e6b0
chore: 🔧 remove client (#111)
* chore: 🔧 remove client

* chore: 🔧 change cookie name

* chore: 🔧 remove auth param

* chore: 🔧 remove auth components

* chore: 🔧 add getaccount query

* fix: 🐛 tests

* chore: 🔧 get account

* chore: 🔧 status check

* chore: 🔧 remove log

* chore: 🔧 update apollo client

* refactor: ♻️ server side props

* chore: 🔧 ssr queries

* chore: 🔧 more ssr queries

* chore: 🔧 type check

* chore: 🔧 increase nodeinfo limit

Co-authored-by: apotdevin <apotdevincab@gmail.com>
2020-08-05 08:37:02 +02:00

13 lines
404 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 })
);
}