@@ -12,7 +12,7 @@ test('plugs resolvers with schema', () => {
1212 } ) . then ( ( result ) =>
1313 expect ( result ) . toEqual ( {
1414 data : { Post : { id : '0' , title : 'hello' } } ,
15- } )
15+ } ) ,
1616 ) ;
1717} ) ;
1818
@@ -56,7 +56,7 @@ test('all* route returns all entities by default', () =>
5656 data : {
5757 allPosts : [ { id : '1' } , { id : '2' } , { id : '3' } ] ,
5858 } ,
59- } )
59+ } ) ,
6060 ) ) ;
6161test ( 'all* route supports pagination' , ( ) =>
6262 graphql ( {
@@ -67,7 +67,7 @@ test('all* route supports pagination', () =>
6767 data : {
6868 allPosts : [ { id : '1' } , { id : '2' } ] ,
6969 } ,
70- } )
70+ } ) ,
7171 ) ) ;
7272test ( 'all* route supports sorting' , ( ) =>
7373 graphql ( {
@@ -78,7 +78,7 @@ test('all* route supports sorting', () =>
7878 data : {
7979 allPosts : [ { id : '1' } , { id : '3' } , { id : '2' } ] ,
8080 } ,
81- } )
81+ } ) ,
8282 ) ) ;
8383test ( 'all* route supports filtering' , ( ) =>
8484 graphql ( {
@@ -89,15 +89,15 @@ test('all* route supports filtering', () =>
8989 data : {
9090 allPosts : [ { id : '1' } ] ,
9191 } ,
92- } )
92+ } ) ,
9393 ) ) ;
9494test ( 'entity route returns a single entity' , ( ) =>
9595 graphql ( { schema, source : '{ Post(id: 2) { id } }' } ) . then ( ( result ) =>
9696 expect ( result ) . toEqual ( {
9797 data : {
9898 Post : { id : '2' } ,
9999 } ,
100- } )
100+ } ) ,
101101 ) ) ;
102102test ( 'entity route gets all the entity fields' , ( ) =>
103103 graphql ( {
@@ -113,14 +113,14 @@ test('entity route gets all the entity fields', () =>
113113 views : 254 ,
114114 } ,
115115 } ,
116- } )
116+ } ) ,
117117 ) ) ;
118118test ( 'entity route get many to one relationships fields' , ( ) =>
119119 graphql ( { schema, source : '{ Post(id: 1) { User { name } } }' } ) . then (
120120 ( result ) =>
121121 expect ( result ) . toEqual ( {
122122 data : { Post : { User : { name : 'John Doe' } } } ,
123- } )
123+ } ) ,
124124 ) ) ;
125125test ( 'entity route get one to many relationships fields' , ( ) =>
126126 graphql ( { schema, source : '{ Post(id: 1) { Comments { body } } }' } ) . then (
@@ -134,13 +134,13 @@ test('entity route get one to many relationships fields', () =>
134134 ] ,
135135 } ,
136136 } ,
137- } )
137+ } ) ,
138138 ) ) ;
139139test ( 'returns an error when asked for a non existent field' , ( ) =>
140140 graphql ( { schema, source : '{ Post(id: 1) { foo } }' } ) . then ( ( result ) => {
141141 expect ( result . errors ) . toHaveLength ( 1 ) ;
142142 const errors = result . errors as any [ ] ;
143143 expect ( errors [ 0 ] . message ) . toEqual (
144- 'Cannot query field "foo" on type "Post".'
144+ 'Cannot query field "foo" on type "Post".' ,
145145 ) ;
146146 } ) ) ;
0 commit comments