77 * @flow
88 */
99
10- import { expect } from 'chai' ;
11- import { describe , it } from 'mocha' ;
12- import { StarWarsSchema } from './starWarsSchema.js' ;
13- import { graphql } from 'graphql' ;
10+ import { expect } from 'chai' ;
11+ import { describe , it } from 'mocha' ;
12+ import { StarWarsSchema } from './starWarsSchema.js' ;
13+ import { graphql } from 'graphql' ;
1414
1515// 80+ char lines are useful in describe/it, so ignore in this file.
1616/* eslint-disable max-len */
@@ -38,15 +38,15 @@ describe('Star Wars connections', () => {
3838 edges : [
3939 {
4040 node : {
41- name : 'X-Wing'
42- }
43- }
44- ]
45- }
46- }
41+ name : 'X-Wing' ,
42+ } ,
43+ } ,
44+ ] ,
45+ } ,
46+ } ,
4747 } ;
4848 const result = await graphql ( StarWarsSchema , query ) ;
49- expect ( result ) . to . deep . equal ( { data : expected } ) ;
49+ expect ( result ) . to . deep . equal ( { data : expected } ) ;
5050 } ) ;
5151
5252 it ( 'fetches the first two ships of the rebels with a cursor' , async ( ) => {
@@ -73,21 +73,21 @@ describe('Star Wars connections', () => {
7373 {
7474 cursor : 'YXJyYXljb25uZWN0aW9uOjA=' ,
7575 node : {
76- name : 'X-Wing'
77- }
76+ name : 'X-Wing' ,
77+ } ,
7878 } ,
7979 {
8080 cursor : 'YXJyYXljb25uZWN0aW9uOjE=' ,
8181 node : {
82- name : 'Y-Wing'
83- }
84- }
85- ]
86- }
87- }
82+ name : 'Y-Wing' ,
83+ } ,
84+ } ,
85+ ] ,
86+ } ,
87+ } ,
8888 } ;
8989 const result = await graphql ( StarWarsSchema , query ) ;
90- expect ( result ) . to . deep . equal ( { data : expected } ) ;
90+ expect ( result ) . to . deep . equal ( { data : expected } ) ;
9191 } ) ;
9292
9393 it ( 'fetches the next three ships of the rebels with a cursor' , async ( ) => {
@@ -114,27 +114,27 @@ describe('Star Wars connections', () => {
114114 {
115115 cursor : 'YXJyYXljb25uZWN0aW9uOjI=' ,
116116 node : {
117- name : 'A-Wing'
118- }
117+ name : 'A-Wing' ,
118+ } ,
119119 } ,
120120 {
121121 cursor : 'YXJyYXljb25uZWN0aW9uOjM=' ,
122122 node : {
123- name : 'Millenium Falcon'
124- }
123+ name : 'Millenium Falcon' ,
124+ } ,
125125 } ,
126126 {
127127 cursor : 'YXJyYXljb25uZWN0aW9uOjQ=' ,
128128 node : {
129- name : 'Home One'
130- }
131- }
132- ]
133- }
134- }
129+ name : 'Home One' ,
130+ } ,
131+ } ,
132+ ] ,
133+ } ,
134+ } ,
135135 } ;
136136 const result = await graphql ( StarWarsSchema , query ) ;
137- expect ( result ) . to . deep . equal ( { data : expected } ) ;
137+ expect ( result ) . to . deep . equal ( { data : expected } ) ;
138138 } ) ;
139139
140140 it ( 'fetches no ships of the rebels at the end of connection' , async ( ) => {
@@ -157,12 +157,12 @@ describe('Star Wars connections', () => {
157157 rebels : {
158158 name : 'Alliance to Restore the Republic' ,
159159 ships : {
160- edges : [ ]
161- }
162- }
160+ edges : [ ] ,
161+ } ,
162+ } ,
163163 } ;
164164 const result = await graphql ( StarWarsSchema , query ) ;
165- expect ( result ) . to . deep . equal ( { data : expected } ) ;
165+ expect ( result ) . to . deep . equal ( { data : expected } ) ;
166166 } ) ;
167167
168168 it ( 'identifies the end of the list' , async ( ) => {
@@ -200,44 +200,44 @@ describe('Star Wars connections', () => {
200200 edges : [
201201 {
202202 node : {
203- name : 'X-Wing'
204- }
203+ name : 'X-Wing' ,
204+ } ,
205205 } ,
206206 {
207207 node : {
208- name : 'Y-Wing'
209- }
210- }
208+ name : 'Y-Wing' ,
209+ } ,
210+ } ,
211211 ] ,
212212 pageInfo : {
213- hasNextPage : true
214- }
213+ hasNextPage : true ,
214+ } ,
215215 } ,
216216 moreShips : {
217217 edges : [
218218 {
219219 node : {
220- name : 'A-Wing'
221- }
220+ name : 'A-Wing' ,
221+ } ,
222222 } ,
223223 {
224224 node : {
225- name : 'Millenium Falcon'
226- }
225+ name : 'Millenium Falcon' ,
226+ } ,
227227 } ,
228228 {
229229 node : {
230- name : 'Home One'
231- }
232- }
230+ name : 'Home One' ,
231+ } ,
232+ } ,
233233 ] ,
234234 pageInfo : {
235- hasNextPage : false
236- }
237- }
238- }
235+ hasNextPage : false ,
236+ } ,
237+ } ,
238+ } ,
239239 } ;
240240 const result = await graphql ( StarWarsSchema , query ) ;
241- expect ( result ) . to . deep . equal ( { data : expected } ) ;
241+ expect ( result ) . to . deep . equal ( { data : expected } ) ;
242242 } ) ;
243243} ) ;
0 commit comments