@@ -169,14 +169,10 @@ const TypeA = new GraphQLObjectType({
169
169
nameA : { type : GraphQLString } ,
170
170
} ) ,
171
171
isTypeOf : ( _value , _context , _info ) =>
172
- new Promise (
173
- ( _resolve , reject ) =>
174
- void setTimeout (
175
- ( ) => void reject ( new Error ( "TypeA_isTypeOf_rejected" ) ) ,
176
- 10 ,
177
- ) ,
172
+ new Promise ( ( _resolve , reject ) =>
173
+ // eslint-disable-next-line
174
+ setTimeout ( ( ) => reject ( new Error ( 'TypeA_isTypeOf_rejected' ) ) , 10 ) ,
178
175
) ,
179
- } ,
180
176
} ) ;
181
177
182
178
const TypeB = new GraphQLObjectType ( {
@@ -186,9 +182,7 @@ const TypeB = new GraphQLObjectType({
186
182
id : { type : GraphQLString } ,
187
183
nameB : { type : GraphQLString } ,
188
184
} ) ,
189
- isTypeOf : ( value : any , _context , _info ) => {
190
- return value . id === 'b' ;
191
- } ,
185
+ isTypeOf : ( value : any , _context , _info ) => value . id === 'b' ,
192
186
} ) ;
193
187
194
188
const queryTypeWithSearchable = new GraphQLObjectType ( {
@@ -640,6 +634,7 @@ describe('Execute: Union and intersection types', () => {
640
634
const unhandledRejectionListener = ( reason : any ) => {
641
635
unhandledRejection = reason ;
642
636
} ;
637
+ // eslint-disable-next-line
643
638
process . on ( 'unhandledRejection' , unhandledRejectionListener ) ;
644
639
/* c8 ignore end */
645
640
@@ -648,7 +643,7 @@ describe('Execute: Union and intersection types', () => {
648
643
document,
649
644
} ) ;
650
645
651
- expect ( result . errors ) . to . be . undefined ;
646
+ expect ( result . errors ) . to . equal ( undefined ) ;
652
647
expect ( result . data ) . to . deep . equal ( {
653
648
search : {
654
649
__typename : 'TypeB' ,
@@ -658,10 +653,12 @@ describe('Execute: Union and intersection types', () => {
658
653
} ) ;
659
654
660
655
// Give the TypeA promise a chance to reject and the listener to fire
656
+ // eslint-disable-next-line
661
657
await new Promise ( ( resolve ) => setTimeout ( resolve , 20 ) ) ;
662
658
659
+ // eslint-disable-next-line
663
660
process . removeListener ( 'unhandledRejection' , unhandledRejectionListener ) ;
664
661
665
- expect ( unhandledRejection ) . to . be . null ;
662
+ expect ( unhandledRejection ) . to . equal ( null ) ;
666
663
} ) ;
667
664
} ) ;
0 commit comments