Vulcan/packages/vulcan-lib/test/server/graphql.test.js

23 lines
821 B
JavaScript
Raw Normal View History

2019-01-02 17:53:10 +01:00
import expect from 'expect';
2019-01-02 17:53:10 +01:00
import {GraphQLSchema} from '../../lib/modules/graphql';
import initGraphQL from '../../lib/server/apollo-server/initGraphQL';
2019-01-02 17:53:10 +01:00
describe('vulcan:lib/graphql', function() {
// TODO: handle the graphQL init better to fix those tests
it.skip('throws if graphql schema is not initialized', function() {
expect(() => GraphQLSchema.getSchema()).toThrow();
});
it.skip('throws if executable schema is not initialized', function() {
expect(() => GraphQLSchema.getExecutableSchema()).toThrow();
});
it('can access the graphql schema', function() {
initGraphQL();
expect(GraphQLSchema.getSchema()).toBeDefined();
});
it('can access the executable graphql schema', function() {
initGraphQL();
expect(GraphQLSchema.getExecutableSchema()).toBeDefined();
});
});