1+ // @flow  strict 
2+ 
13import  {  expect  }  from  'chai' ; 
24import  {  describe ,  it  }  from  'mocha' ; 
35import  request  from  'supertest' ; 
@@ -8,13 +10,15 @@ import graphqlHTTP from '../';
810describe ( 'Useful errors when incorrectly used' ,  ( )  =>  { 
911 it ( 'requires an option factory function' ,  ( )  =>  { 
1012 expect ( ( )  =>  { 
13+  // $DisableFlowOnNegativeTest 
1114 graphqlHTTP ( ) ; 
1215 } ) . to . throw ( 'GraphQL middleware requires options.' ) ; 
1316 } ) ; 
1417
1518 it ( 'requires option factory function to return object' ,  async  ( )  =>  { 
1619 const  app  =  express ( ) ; 
1720
21+  // $DisableFlowOnNegativeTest 
1822 app . use ( '/graphql' ,  graphqlHTTP ( ( )  =>  null ) ) ; 
1923
2024 const  response  =  await  request ( app ) . get ( '/graphql?query={test}' ) ; 
@@ -33,6 +37,7 @@ describe('Useful errors when incorrectly used', () => {
3337 it ( 'requires option factory function to return object or promise of object' ,  async  ( )  =>  { 
3438 const  app  =  express ( ) ; 
3539
40+  // $DisableFlowOnNegativeTest 
3641 app . use ( '/graphql' ,  graphqlHTTP ( ( )  =>  Promise . resolve ( null ) ) ) ; 
3742
3843 const  response  =  await  request ( app ) . get ( '/graphql?query={test}' ) ; 
@@ -51,6 +56,7 @@ describe('Useful errors when incorrectly used', () => {
5156 it ( 'requires option factory function to return object with schema' ,  async  ( )  =>  { 
5257 const  app  =  express ( ) ; 
5358
59+  // $DisableFlowOnNegativeTest 
5460 app . use ( '/graphql' ,  graphqlHTTP ( ( )  =>  ( { } ) ) ) ; 
5561
5662 const  response  =  await  request ( app ) . get ( '/graphql?query={test}' ) ; 
@@ -66,6 +72,7 @@ describe('Useful errors when incorrectly used', () => {
6672 it ( 'requires option factory function to return object or promise of object with schema' ,  async  ( )  =>  { 
6773 const  app  =  express ( ) ; 
6874
75+  // $DisableFlowOnNegativeTest 
6976 app . use ( '/graphql' ,  graphqlHTTP ( ( )  =>  Promise . resolve ( { } ) ) ) ; 
7077
7178 const  response  =  await  request ( app ) . get ( '/graphql?query={test}' ) ; 
@@ -79,6 +86,7 @@ describe('Useful errors when incorrectly used', () => {
7986 } ) ; 
8087
8188 it ( 'validates schema before executing request' ,  async  ( )  =>  { 
89+  // $DisableFlowOnNegativeTest 
8290 const  schema  =  new  GraphQLSchema ( {  directives : [ null ]  } ) ; 
8391
8492 const  app  =  express ( ) ; 
0 commit comments