2017-04-08 14:17:49 -07:00
|
|
|
import { microGraphql, microGraphiql } from './microApollo';
|
|
|
|
import 'mocha';
|
|
|
|
|
2017-05-24 00:20:09 -06:00
|
|
|
import micro from 'micro';
|
2017-04-08 14:17:49 -07:00
|
|
|
import testSuite, { schema as Schema, CreateAppOptions } from 'graphql-server-integration-testsuite';
|
|
|
|
|
|
|
|
function createApp(options: CreateAppOptions) {
|
|
|
|
if (options && options.graphiqlOptions ) {
|
2017-05-24 00:20:09 -06:00
|
|
|
return micro(microGraphiql(options.graphiqlOptions));
|
2017-04-08 14:17:49 -07:00
|
|
|
} else {
|
|
|
|
const graphqlOptions = (options && options.graphqlOptions) || { schema: Schema };
|
|
|
|
return micro(microGraphql(graphqlOptions));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
describe('integration:Micro', () => {
|
|
|
|
testSuite(createApp);
|
|
|
|
});
|