Skip to content

Commit 5f73d30

Browse files
committed
adapted new tests from master
1 parent 73ca2ab commit 5f73d30

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/utilities/__tests__/findBreakingChanges-test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ describe('findBreakingChanges', () => {
6060
union TypeWasInterfaceBecomesUnion
6161
input TypeWasObjectBecomesInputObject
6262
`);
63+
6364
const changes = findBreakingChanges(oldSchema, newSchema);
6465
expect(changes[0]).to.deep.include({
6566
type: BreakingChangeType.TYPE_CHANGED_KIND,
@@ -75,11 +76,19 @@ describe('findBreakingChanges', () => {
7576
description:
7677
'TypeWasInterfaceBecomesUnion changed from an Interface type to a Union type.',
7778
});
79+
// $FlowFixMe
80+
expect(changes[1].oldNode.kind).to.equal('InterfaceTypeDefinition');
81+
// $FlowFixMe
82+
expect(changes[1].newNode.kind).to.equal('UnionTypeDefinition');
7883
expect(changes[2]).to.deep.include({
7984
type: BreakingChangeType.TYPE_CHANGED_KIND,
8085
description:
8186
'TypeWasObjectBecomesInputObject changed from an Object type to an Input type.',
8287
});
88+
// $FlowFixMe
89+
expect(changes[2].oldNode.kind).to.equal('ObjectTypeDefinition');
90+
// $FlowFixMe
91+
expect(changes[2].newNode.kind).to.equal('InputObjectTypeDefinition');
8392
});
8493

8594
it('should detect if a field on a type was deleted or changed type', () => {

0 commit comments

Comments
 (0)