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

22 lines
No EOL
846 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import expect from 'expect'
import { GraphQLSchema } from '../../lib/modules/graphql'
import initGraphQL from '../../lib/server/apollo-server/initGraphQL'
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()
})
})