Skip to content

Commit ca6a8ab

Browse files
committed
Better
1 parent 67df3aa commit ca6a8ab

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/utils/tests/print-schema-with-directives.spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -388,17 +388,17 @@ describe('printSchemaWithDirectives', () => {
388388
},
389389
},
390390
} as GraphQLInputObjectTypeConfig);
391-
const schema = new GraphQLSchema({
392-
query: new GraphQLObjectType({
393-
name: 'Query',
394-
fields: {},
395-
}),
396-
types: [oneOfInputType],
397-
});
398-
399-
const output = printSchemaWithDirectives(schema);
400391
// Only if `isOneOf` is supported, it should print the directive
401392
if ((oneOfInputType as any).isOneOf) {
393+
const schema = new GraphQLSchema({
394+
query: new GraphQLObjectType({
395+
name: 'Query',
396+
fields: {},
397+
}),
398+
types: [oneOfInputType],
399+
});
400+
401+
const output = printSchemaWithDirectives(schema);
402402
expect(output).toContain('input OneOfInput @oneOf');
403403
}
404404
});

0 commit comments

Comments
 (0)