@@ -611,8 +611,8 @@ test('Response is cached', async (t) => {
611611 getFoo ( ) {
612612 return this . get ( path , {
613613 requestCache : {
614- maxTtl : 100 ,
615- maxTtlIfError : 200 ,
614+ maxTtl : 10 ,
615+ maxTtlIfError : 20 ,
616616 } ,
617617 } )
618618 }
@@ -641,13 +641,13 @@ test('Response is cached', async (t) => {
641641 let response = await dataSource . getFoo ( )
642642 t . false ( response . isFromCache )
643643 t . false ( response . memoized )
644- t . is ( response . maxTtl , 200 )
644+ t . is ( response . maxTtl , 20 )
645645 t . deepEqual ( response . body , { name : 'foo' } )
646646
647647 response = await dataSource . getFoo ( )
648648 t . false ( response . isFromCache )
649649 t . true ( response . memoized )
650- t . is ( response . maxTtl , 200 )
650+ t . is ( response . maxTtl , 20 )
651651 t . deepEqual ( response . body , { name : 'foo' } )
652652
653653 dataSource = new ( class extends HTTPDataSource {
@@ -657,8 +657,8 @@ test('Response is cached', async (t) => {
657657 getFoo ( ) {
658658 return this . get ( path , {
659659 requestCache : {
660- maxTtl : 100 ,
661- maxTtlIfError : 200 ,
660+ maxTtl : 10 ,
661+ maxTtlIfError : 20 ,
662662 } ,
663663 } )
664664 }
@@ -669,7 +669,7 @@ test('Response is cached', async (t) => {
669669 response = await dataSource . getFoo ( )
670670 t . true ( response . isFromCache )
671671 t . false ( response . memoized )
672- t . is ( response . maxTtl , 200 )
672+ t . is ( response . maxTtl , 20 )
673673 t . deepEqual ( response . body , { name : 'foo' } )
674674
675675 const cached = JSON . parse ( map . get ( 'keyv:' + baseURL + path ) ! )
@@ -725,8 +725,8 @@ test('Fallback from cache on origin error', async (t) => {
725725 getFoo ( ) {
726726 return this . get ( path , {
727727 requestCache : {
728- maxTtl : 100 ,
729- maxTtlIfError : 200 ,
728+ maxTtl : 10 ,
729+ maxTtlIfError : 20 ,
730730 } ,
731731 } )
732732 }
@@ -755,7 +755,7 @@ test('Fallback from cache on origin error', async (t) => {
755755 let response = await dataSource . getFoo ( )
756756 t . false ( response . isFromCache )
757757 t . false ( response . memoized )
758- t . is ( response . maxTtl , 200 )
758+ t . is ( response . maxTtl , 20 )
759759
760760 t . deepEqual ( response . body , { name : 'foo' } )
761761
@@ -770,8 +770,8 @@ test('Fallback from cache on origin error', async (t) => {
770770 getFoo ( ) {
771771 return this . get ( path , {
772772 requestCache : {
773- maxTtl : 100 ,
774- maxTtlIfError : 200 ,
773+ maxTtl : 10 ,
774+ maxTtlIfError : 20 ,
775775 } ,
776776 } )
777777 }
@@ -782,7 +782,7 @@ test('Fallback from cache on origin error', async (t) => {
782782 response = await dataSource . getFoo ( )
783783 t . true ( response . isFromCache )
784784 t . false ( response . memoized )
785- t . is ( response . maxTtl , 200 )
785+ t . is ( response . maxTtl , 20 )
786786
787787 t . deepEqual ( response . body , { name : 'foo' } )
788788
@@ -816,8 +816,8 @@ test('Should not cache POST requests', async (t) => {
816816 postFoo ( ) {
817817 return this . post ( path , {
818818 requestCache : {
819- maxTtl : 100 ,
820- maxTtlIfError : 200 ,
819+ maxTtl : 10 ,
820+ maxTtlIfError : 20 ,
821821 } ,
822822 } )
823823 }
@@ -837,7 +837,7 @@ test('Should not cache POST requests', async (t) => {
837837 return map . get ( key )
838838 } ,
839839 async set ( key : string , value : string , options : KeyValueCacheSetOptions ) {
840- t . deepEqual ( options , { ttl : 100 } )
840+ t . deepEqual ( options , { ttl : 10 } )
841841 map . set ( key , value )
842842 } ,
843843 } ,
@@ -876,8 +876,8 @@ test('Response is not cached due to origin error', async (t) => {
876876 getFoo ( ) {
877877 return this . get ( path , {
878878 requestCache : {
879- maxTtl : 100 ,
880- maxTtlIfError : 200 ,
879+ maxTtl : 10 ,
880+ maxTtlIfError : 20 ,
881881 } ,
882882 } )
883883 }
0 commit comments