@@ -58,14 +58,14 @@ after(done => {
58
58
59
59
describe ( 'node-fetch' , ( ) => {
60
60
it ( 'should return a promise' , function ( ) {
61
- url = 'http://example.com/' ;
61
+ url = ` ${ base } hello` ;
62
62
const p = fetch ( url ) ;
63
63
expect ( p ) . to . be . an . instanceof ( fetch . Promise ) ;
64
64
expect ( p ) . to . have . property ( 'then' ) ;
65
65
} ) ;
66
66
67
67
it ( 'should allow custom promise' , function ( ) {
68
- url = 'http://example.com/' ;
68
+ url = ` ${ base } hello` ;
69
69
const old = fetch . Promise ;
70
70
fetch . Promise = then ;
71
71
expect ( fetch ( url ) ) . to . be . an . instanceof ( then ) ;
@@ -74,7 +74,7 @@ describe('node-fetch', () => {
74
74
} ) ;
75
75
76
76
it ( 'should throw error when no promise implementation are found' , function ( ) {
77
- url = 'http://example.com/' ;
77
+ url = ` ${ base } hello` ;
78
78
const old = fetch . Promise ;
79
79
fetch . Promise = undefined ;
80
80
expect ( ( ) => {
@@ -626,24 +626,24 @@ describe('node-fetch', () => {
626
626
} ) ;
627
627
628
628
it ( 'should clear internal timeout on fetch response' , function ( done ) {
629
- this . timeout ( 1000 ) ;
630
- spawn ( 'node' , [ '-e' , `require('./')('${ base } hello', { timeout: 5000 })` ] )
629
+ this . timeout ( 2000 ) ;
630
+ spawn ( 'node' , [ '-e' , `require('./')('${ base } hello', { timeout: 10000 })` ] )
631
631
. on ( 'exit' , ( ) => {
632
632
done ( ) ;
633
633
} ) ;
634
634
} ) ;
635
635
636
636
it ( 'should clear internal timeout on fetch redirect' , function ( done ) {
637
- this . timeout ( 1000 ) ;
638
- spawn ( 'node' , [ '-e' , `require('./')('${ base } redirect/301', { timeout: 5000 })` ] )
637
+ this . timeout ( 2000 ) ;
638
+ spawn ( 'node' , [ '-e' , `require('./')('${ base } redirect/301', { timeout: 10000 })` ] )
639
639
. on ( 'exit' , ( ) => {
640
640
done ( ) ;
641
641
} ) ;
642
642
} ) ;
643
643
644
644
it ( 'should clear internal timeout on fetch error' , function ( done ) {
645
- this . timeout ( 1000 ) ;
646
- spawn ( 'node' , [ '-e' , `require('./')('${ base } error/reset', { timeout: 5000 })` ] )
645
+ this . timeout ( 2000 ) ;
646
+ spawn ( 'node' , [ '-e' , `require('./')('${ base } error/reset', { timeout: 10000 })` ] )
647
647
. on ( 'exit' , ( ) => {
648
648
done ( ) ;
649
649
} ) ;
0 commit comments