Created
April 20, 2019 11:08
-
-
Save shailen-naidoo/9cd87a7451764291deb05c1c971c9ca7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { gql } = require('apollo-server-express'); | |
const { typeQuery, typePerson } = require(./index); | |
test('check if type Query has correct fields', () => { | |
expect(typeQuery).toBe(gql` | |
type Query { | |
_: Boolean | |
} | |
`); | |
}); | |
test('check if type Person has correct fields', () => { | |
expect(typePerson).toBe(gql` | |
type Person { | |
name: String! | |
surname: String! | |
} | |
extend type Query { | |
person: Person! | |
} | |
`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment