Skip to content

Commit

Permalink
buildClientSchema-test: remove dependency on order of types (#2406)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored Jan 28, 2020
1 parent 4589229 commit 4558f9b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/utilities/__tests__/buildClientSchema-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,10 @@ describe('Type System: build schema from introspection', () => {
const schema = buildSchema(sdl, { assumeValid: true });
const introspection = introspectionFromSchema(schema);

expect(introspection.__schema.types[1]).to.deep.include({
const fooIntrospection = introspection.__schema.types.find(
type => type.name === 'Foo',
);
expect(fooIntrospection).to.deep.include({
name: 'Foo',
interfaces: [{ kind: 'OBJECT', name: 'Foo', ofType: null }],
});
Expand All @@ -912,7 +915,10 @@ describe('Type System: build schema from introspection', () => {
const schema = buildSchema(sdl, { assumeValid: true });
const introspection = introspectionFromSchema(schema);

expect(introspection.__schema.types[1]).to.deep.include({
const fooIntrospection = introspection.__schema.types.find(
type => type.name === 'Foo',
);
expect(fooIntrospection).to.deep.include({
name: 'Foo',
possibleTypes: [{ kind: 'UNION', name: 'Foo', ofType: null }],
});
Expand Down

0 comments on commit 4558f9b

Please sign in to comment.