@@ -172,6 +172,7 @@ describe('http-client API', () => {
172
172
should . exist ( err . requestUrl ) ;
173
173
err . requestUrl . should . equal ( url ) ;
174
174
} ) ;
175
+
175
176
it ( 'successfully makes request with default json headers' , async ( ) => {
176
177
let err ;
177
178
let response ;
@@ -190,6 +191,7 @@ describe('http-client API', () => {
190
191
const { accept} = response . data . headers ;
191
192
accept . should . equal ( 'application/ld+json, application/json' ) ;
192
193
} ) ;
194
+
193
195
it ( 'successfully makes request with header that is overridden' , async ( ) => {
194
196
let err ;
195
197
let response ;
@@ -212,6 +214,7 @@ describe('http-client API', () => {
212
214
const { accept} = response . data . headers ;
213
215
accept . should . equal ( 'text/html' ) ;
214
216
} ) ;
217
+
215
218
it ( 'can use create() to provide default headers' , async ( ) => {
216
219
let err ;
217
220
let response ;
@@ -234,6 +237,7 @@ describe('http-client API', () => {
234
237
const { accept} = response . data . headers ;
235
238
accept . should . equal ( 'text/html' ) ;
236
239
} ) ;
240
+
237
241
it ( 'handles a successful get with JSON data' , async ( ) => {
238
242
let err ;
239
243
let response ;
@@ -252,6 +256,7 @@ describe('http-client API', () => {
252
256
should . exist ( ct ) ;
253
257
ct . includes ( 'application/json' ) . should . be . true ;
254
258
} ) ;
259
+
255
260
it ( 'handles a successful get with HTML data' , async ( ) => {
256
261
let err ;
257
262
let response ;
@@ -271,6 +276,7 @@ describe('http-client API', () => {
271
276
should . exist ( ct ) ;
272
277
ct . includes ( 'text/html' ) . should . be . true ;
273
278
} ) ;
279
+
274
280
it ( 'handles a successful direct get' , async ( ) => {
275
281
let err ;
276
282
let response ;
@@ -286,6 +292,7 @@ describe('http-client API', () => {
286
292
should . exist ( response . data ) ;
287
293
response . status . should . equal ( 200 ) ;
288
294
} ) ;
295
+
289
296
it ( 'handles a get not found error with JSON data' , async ( ) => {
290
297
let err ;
291
298
let response ;
@@ -309,6 +316,7 @@ describe('http-client API', () => {
309
316
err . data . code . should . equal ( 404 ) ;
310
317
err . data . description . should . equal ( 'Not Found' ) ;
311
318
} ) ;
319
+
312
320
it ( 'handles a direct get not found error with JSON data' , async ( ) => {
313
321
let err ;
314
322
let response ;
@@ -332,6 +340,7 @@ describe('http-client API', () => {
332
340
err . data . code . should . equal ( 404 ) ;
333
341
err . data . description . should . equal ( 'Not Found' ) ;
334
342
} ) ;
343
+
335
344
if ( isNode ) {
336
345
describe ( 'Nodejs execution context' , ( ) => {
337
346
it ( 'handles a network error' , async ( ) => {
0 commit comments