Skip to content

Commit

Permalink
Add test for empty interfaces case
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-marcacci committed Aug 17, 2019
1 parent 2570536 commit 0f7e7ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utilities/__tests__/buildASTSchema-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ describe('Schema Builder', () => {
const sdl = dedent`
interface EmptyInterface
`;

const definition = parse(sdl).definitions[0];
expect(
definition.kind === 'InterfaceTypeDefinition' && definition.interfaces,
).to.deep.equal([], 'The interfaces property must be an empty array.');

expect(cycleSDL(sdl)).to.equal(sdl);
});

Expand Down

0 comments on commit 0f7e7ad

Please sign in to comment.