@@ -834,7 +834,9 @@ describe('HttpBatchLink', () => {
834834 variables : { } ,
835835 } ;
836836 const errorBody = {
837- errors : [ { message : 'Validation error' , extensions : { code : 'GRAPHQL_VALIDATION_FAILED' } } ] ,
837+ errors : [
838+ { message : 'Validation error' , extensions : { code : 'GRAPHQL_VALIDATION_FAILED' } } ,
839+ ] ,
838840 } ;
839841
840842 execute ( link , op ) . subscribe ( {
@@ -853,7 +855,9 @@ describe('HttpBatchLink', () => {
853855 } ) ;
854856
855857 setTimeout ( ( ) => {
856- httpBackend . expectOne ( 'graphql' ) . flush ( [ errorBody ] , { status : 400 , statusText : 'Bad Request' } ) ;
858+ httpBackend
859+ . expectOne ( 'graphql' )
860+ . flush ( [ errorBody ] , { status : 400 , statusText : 'Bad Request' } ) ;
857861 } , 50 ) ;
858862 } ) ) ;
859863
@@ -887,7 +891,9 @@ describe('HttpBatchLink', () => {
887891 } ) ;
888892
889893 setTimeout ( ( ) => {
890- httpBackend . expectOne ( 'graphql' ) . flush ( errorBody , { status : 500 , statusText : 'Internal Server Error' } ) ;
894+ httpBackend
895+ . expectOne ( 'graphql' )
896+ . flush ( errorBody , { status : 500 , statusText : 'Internal Server Error' } ) ;
891897 } , 50 ) ;
892898 } ) ) ;
893899
@@ -904,7 +910,10 @@ describe('HttpBatchLink', () => {
904910 variables : { } ,
905911 } ;
906912 const errorBody = [ { errors : [ { message : 'Not found' } ] } ] ;
907- const customHeaders = new HttpHeaders ( { 'X-Custom-Header' : 'test-value' , 'X-Request-ID' : '12345' } ) ;
913+ const customHeaders = new HttpHeaders ( {
914+ 'X-Custom-Header' : 'test-value' ,
915+ 'X-Request-ID' : '12345' ,
916+ } ) ;
908917
909918 execute ( link , op ) . subscribe ( {
910919 next : ( ) => {
@@ -932,7 +941,7 @@ describe('HttpBatchLink', () => {
932941 httpBackend . expectOne ( 'graphql' ) . flush ( errorBody , {
933942 status : 404 ,
934943 statusText : 'Not Found' ,
935- headers : customHeaders
944+ headers : customHeaders ,
936945 } ) ;
937946 } , 50 ) ;
938947 } ) ) ;
@@ -972,14 +981,15 @@ describe('HttpBatchLink', () => {
972981 } ) ;
973982
974983 setTimeout ( ( ) => {
975- httpBackend . expectOne ( 'graphql' ) . flush (
976- [ { errors : [ { message : 'Bad request' } ] } ] ,
977- { status : 400 , statusText : 'Bad Request' }
978- ) ;
984+ httpBackend
985+ . expectOne ( 'graphql' )
986+ . flush ( [ { errors : [ { message : 'Bad request' } ] } ] , {
987+ status : 400 ,
988+ statusText : 'Bad Request' ,
989+ } ) ;
979990 } , 50 ) ;
980991 } ) ) ;
981992
982-
983993 test ( 'should extract body text from string error' , ( ) =>
984994 new Promise < void > ( done => {
985995 const link = httpLink . create ( { uri : 'graphql' } ) ;
@@ -1006,7 +1016,9 @@ describe('HttpBatchLink', () => {
10061016 } ) ;
10071017
10081018 setTimeout ( ( ) => {
1009- httpBackend . expectOne ( 'graphql' ) . flush ( errorBody , { status : 500 , statusText : 'Server Error' } ) ;
1019+ httpBackend
1020+ . expectOne ( 'graphql' )
1021+ . flush ( errorBody , { status : 500 , statusText : 'Server Error' } ) ;
10101022 } , 50 ) ;
10111023 } ) ) ;
10121024
@@ -1036,7 +1048,9 @@ describe('HttpBatchLink', () => {
10361048 } ) ;
10371049
10381050 setTimeout ( ( ) => {
1039- httpBackend . expectOne ( 'graphql' ) . flush ( errorBody , { status : 400 , statusText : 'Bad Request' } ) ;
1051+ httpBackend
1052+ . expectOne ( 'graphql' )
1053+ . flush ( errorBody , { status : 400 , statusText : 'Bad Request' } ) ;
10401054 } , 50 ) ;
10411055 } ) ) ;
10421056
@@ -1094,7 +1108,9 @@ describe('HttpBatchLink', () => {
10941108 } ) ;
10951109
10961110 setTimeout ( ( ) => {
1097- httpBackend . expectOne ( 'graphql' ) . flush ( [ { data } ] , { status : 299 , statusText : 'Custom Success' } ) ;
1111+ httpBackend
1112+ . expectOne ( 'graphql' )
1113+ . flush ( [ { data } ] , { status : 299 , statusText : 'Custom Success' } ) ;
10981114 } , 50 ) ;
10991115 } ) ) ;
11001116
@@ -1124,10 +1140,9 @@ describe('HttpBatchLink', () => {
11241140 } ) ;
11251141
11261142 setTimeout ( ( ) => {
1127- httpBackend . expectOne ( 'graphql' ) . flush (
1128- [ { errors : [ { message : 'Error' } ] } ] ,
1129- { status : 300 , statusText : 'Error' }
1130- ) ;
1143+ httpBackend
1144+ . expectOne ( 'graphql' )
1145+ . flush ( [ { errors : [ { message : 'Error' } ] } ] , { status : 300 , statusText : 'Error' } ) ;
11311146 } , 50 ) ;
11321147 } ) ) ;
11331148
@@ -1157,10 +1172,9 @@ describe('HttpBatchLink', () => {
11571172 } ) ;
11581173
11591174 setTimeout ( ( ) => {
1160- httpBackend . expectOne ( 'graphql' ) . flush (
1161- [ { errors : [ { message : 'Error' } ] } ] ,
1162- { status : 404 , statusText : 'Not Found' }
1163- ) ;
1175+ httpBackend
1176+ . expectOne ( 'graphql' )
1177+ . flush ( [ { errors : [ { message : 'Error' } ] } ] , { status : 404 , statusText : 'Not Found' } ) ;
11641178 } , 50 ) ;
11651179 } ) ) ;
11661180
@@ -1190,10 +1204,12 @@ describe('HttpBatchLink', () => {
11901204 } ) ;
11911205
11921206 setTimeout ( ( ) => {
1193- httpBackend . expectOne ( 'graphql' ) . flush (
1194- [ { errors : [ { message : 'Error' } ] } ] ,
1195- { status : 503 , statusText : 'Service Unavailable' }
1196- ) ;
1207+ httpBackend
1208+ . expectOne ( 'graphql' )
1209+ . flush ( [ { errors : [ { message : 'Error' } ] } ] , {
1210+ status : 503 ,
1211+ statusText : 'Service Unavailable' ,
1212+ } ) ;
11971213 } , 50 ) ;
11981214 } ) ) ;
11991215 } ) ;
0 commit comments