@@ -20,6 +20,7 @@ describe('composeWithRelay', () => {
2020 } ) ;
2121
2222 it ( 'should throw error if got a not TypeComposer' , ( ) => {
23+ // $FlowFixMe
2324 expect ( ( ) => composeWithRelay ( 123 ) ) . toThrowError ( 'should provide TypeComposer instance' ) ;
2425 } ) ;
2526
@@ -41,19 +42,23 @@ describe('composeWithRelay', () => {
4142 describe ( 'when pass RootQuery type composer' , ( ) => {
4243 it ( 'should add `node` field to RootQuery' , ( ) => {
4344 const nodeField = rootQueryComposer . getField ( 'node' ) ;
45+ // $FlowFixMe
4446 expect ( nodeField . type ) . toBeInstanceOf ( GraphQLInterfaceType ) ;
47+ // $FlowFixMe
4548 expect ( nodeField . type . name ) . toBe ( 'Node' ) ;
4649 } ) ;
4750 } ) ;
4851
4952 describe ( 'when pass User type composer (not RootQuery)' , ( ) => {
5053 it ( 'should add or override id field' , ( ) => {
5154 const idField = userComposer . getField ( 'id' ) ;
55+ // $FlowFixMe
5256 expect ( idField . description ) . toContain ( 'globally unique ID' ) ;
5357 } ) ;
5458
5559 it ( 'should make id field NonNull' , ( ) => {
5660 const idField = userComposer . getField ( 'id' ) ;
61+ // $FlowFixMe
5762 expect ( idField . type ) . toBeInstanceOf ( GraphQLNonNull ) ;
5863 } ) ;
5964
@@ -72,7 +77,9 @@ describe('composeWithRelay', () => {
7277 }
7378 }` ;
7479 const result = await graphql . graphql ( schema , query ) ;
80+ // $FlowFixMe
7581 expect ( result . data . user . id ) . toBe ( toGlobalId ( 'User' , 1 ) ) ;
82+ // $FlowFixMe
7683 expect ( result . data . user . name ) . toBe ( 'Pavel' ) ;
7784 } ) ;
7885
@@ -94,7 +101,9 @@ describe('composeWithRelay', () => {
94101 name
95102 }` ;
96103 const result = await graphql . graphql ( schema , query ) ;
104+ // $FlowFixMe
97105 expect ( result . data . node . id ) . toBe ( toGlobalId ( 'User' , 1 ) ) ;
106+ // $FlowFixMe
98107 expect ( result . data . node . name ) . toBe ( 'Pavel' ) ;
99108 } ) ;
100109
@@ -116,7 +125,9 @@ describe('composeWithRelay', () => {
116125 }
117126 }` ;
118127 const result = await graphql . graphql ( schema , query ) ;
128+ // $FlowFixMe
119129 expect ( result . data . createUser . record . name ) . toBe ( 'Ok' ) ;
130+ // $FlowFixMe
120131 expect ( result . data . createUser . clientMutationId ) . toBe ( '123' ) ;
121132 } ) ;
122133 } ) ;
0 commit comments