@@ -183,20 +183,23 @@ describe('Type System: Objects', () => {
183183 type : ScalarType ,
184184 deprecationReason : 'A terrible reason' ,
185185 } ,
186+ baz : {
187+ type : ScalarType ,
188+ deprecationReason : '' ,
189+ } ,
186190 } ,
187191 } ) ;
188192
189- expect ( TypeWithDeprecatedField . getFields ( ) . bar ) . to . deep . equal ( {
193+ expect ( TypeWithDeprecatedField . getFields ( ) . bar ) . to . include ( {
190194 name : 'bar' ,
191- description : undefined ,
192- type : ScalarType ,
193- args : [ ] ,
194- resolve : undefined ,
195- subscribe : undefined ,
196195 isDeprecated : true ,
197196 deprecationReason : 'A terrible reason' ,
198- extensions : undefined ,
199- astNode : undefined ,
197+ } ) ;
198+
199+ expect ( TypeWithDeprecatedField . getFields ( ) . baz ) . to . include ( {
200+ name : 'baz' ,
201+ isDeprecated : true ,
202+ deprecationReason : '' ,
200203 } ) ;
201204 } ) ;
202205
@@ -519,17 +522,22 @@ describe('Type System: Enums', () => {
519522 it ( 'defines an enum type with deprecated value' , ( ) => {
520523 const EnumTypeWithDeprecatedValue = new GraphQLEnumType ( {
521524 name : 'EnumWithDeprecatedValue' ,
522- values : { foo : { deprecationReason : 'Just because' } } ,
525+ values : {
526+ foo : { deprecationReason : 'Just because' } ,
527+ bar : { deprecationReason : '' } ,
528+ } ,
523529 } ) ;
524530
525- expect ( EnumTypeWithDeprecatedValue . getValues ( ) [ 0 ] ) . to . deep . equal ( {
531+ expect ( EnumTypeWithDeprecatedValue . getValues ( ) [ 0 ] ) . to . include ( {
526532 name : 'foo' ,
527- description : undefined ,
528533 isDeprecated : true ,
529534 deprecationReason : 'Just because' ,
530- value : 'foo' ,
531- extensions : undefined ,
532- astNode : undefined ,
535+ } ) ;
536+
537+ expect ( EnumTypeWithDeprecatedValue . getValues ( ) [ 1 ] ) . to . include ( {
538+ name : 'bar' ,
539+ isDeprecated : true ,
540+ deprecationReason : '' ,
533541 } ) ;
534542 } ) ;
535543
0 commit comments