File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ describe('findBreakingChanges', () => {
60
60
union TypeWasInterfaceBecomesUnion
61
61
input TypeWasObjectBecomesInputObject
62
62
` ) ;
63
+
63
64
const changes = findBreakingChanges ( oldSchema , newSchema ) ;
64
65
expect ( changes [ 0 ] ) . to . deep . include ( {
65
66
type : BreakingChangeType . TYPE_CHANGED_KIND ,
@@ -75,11 +76,19 @@ describe('findBreakingChanges', () => {
75
76
description :
76
77
'TypeWasInterfaceBecomesUnion changed from an Interface type to a Union type.' ,
77
78
} ) ;
79
+ // $FlowFixMe
80
+ expect ( changes [ 1 ] . oldNode . kind ) . to . equal ( 'InterfaceTypeDefinition' ) ;
81
+ // $FlowFixMe
82
+ expect ( changes [ 1 ] . newNode . kind ) . to . equal ( 'UnionTypeDefinition' ) ;
78
83
expect ( changes [ 2 ] ) . to . deep . include ( {
79
84
type : BreakingChangeType . TYPE_CHANGED_KIND ,
80
85
description :
81
86
'TypeWasObjectBecomesInputObject changed from an Object type to an Input type.' ,
82
87
} ) ;
88
+ // $FlowFixMe
89
+ expect ( changes [ 2 ] . oldNode . kind ) . to . equal ( 'ObjectTypeDefinition' ) ;
90
+ // $FlowFixMe
91
+ expect ( changes [ 2 ] . newNode . kind ) . to . equal ( 'InputObjectTypeDefinition' ) ;
83
92
} ) ;
84
93
85
94
it ( 'should detect if a field on a type was deleted or changed type' , ( ) => {
You can’t perform that action at this time.
0 commit comments