@@ -171,7 +171,7 @@ describe('Cache Interceptor', () => {
171171
172172 test ( 'expires caching' , async ( ) => {
173173 const clock = FakeTimers . install ( {
174- shouldClearNativeTimers : true
174+ toFake : [ 'Date' ]
175175 } )
176176
177177 let requestsToOrigin = 0
@@ -248,7 +248,7 @@ describe('Cache Interceptor', () => {
248248
249249 test ( 'expires caching with Etag' , async ( ) => {
250250 const clock = FakeTimers . install ( {
251- shouldClearNativeTimers : true
251+ toFake : [ 'Date' ]
252252 } )
253253
254254 let requestsToOrigin = 0
@@ -326,7 +326,7 @@ describe('Cache Interceptor', () => {
326326
327327 test ( 'max-age caching' , async ( ) => {
328328 const clock = FakeTimers . install ( {
329- shouldClearNativeTimers : true
329+ toFake : [ 'Date' ]
330330 } )
331331
332332 let requestsToOrigin = 0
@@ -390,7 +390,7 @@ describe('Cache Interceptor', () => {
390390
391391 test ( 'vary headers are present in revalidation request' , async ( ) => {
392392 const clock = FakeTimers . install ( {
393- shouldClearNativeTimers : true
393+ toFake : [ 'Date' ]
394394 } )
395395
396396 let requestsToOrigin = 0
@@ -669,7 +669,7 @@ describe('Cache Interceptor', () => {
669669
670670 test ( 'stale-if-error (response)' , async ( ) => {
671671 const clock = FakeTimers . install ( {
672- shouldClearNativeTimers : true
672+ toFake : [ 'Date' ]
673673 } )
674674
675675 let requestsToOrigin = 0
@@ -751,7 +751,7 @@ describe('Cache Interceptor', () => {
751751 describe ( 'Client-side directives' , ( ) => {
752752 test ( 'max-age' , async ( ) => {
753753 const clock = FakeTimers . install ( {
754- shouldClearNativeTimers : true
754+ toFake : [ 'Date' ]
755755 } )
756756
757757 let requestsToOrigin = 0
@@ -812,7 +812,7 @@ describe('Cache Interceptor', () => {
812812
813813 test ( 'max-stale' , async ( ) => {
814814 const clock = FakeTimers . install ( {
815- shouldClearNativeTimers : true
815+ toFake : [ 'Date' ]
816816 } )
817817
818818 let requestsToOrigin = 0
@@ -885,7 +885,7 @@ describe('Cache Interceptor', () => {
885885
886886 test ( 'min-fresh' , async ( ) => {
887887 const clock = FakeTimers . install ( {
888- shouldClearNativeTimers : true
888+ toFake : [ 'Date' ]
889889 } )
890890
891891 let requestsToOrigin = 0
@@ -1103,7 +1103,7 @@ describe('Cache Interceptor', () => {
11031103
11041104 test ( 'stale-if-error' , async ( ) => {
11051105 const clock = FakeTimers . install ( {
1106- shouldClearNativeTimers : true
1106+ toFake : [ 'Date' ]
11071107 } )
11081108
11091109 let requestsToOrigin = 0
@@ -1988,7 +1988,7 @@ describe('Cache Interceptor', () => {
19881988
19891989 describe ( 'determineDeleteAt' , ( ) => {
19901990 test ( 'max-age response has deleteAt proportional to freshness lifetime, not 1 year' , async ( ) => {
1991- const clock = FakeTimers . install ( { now : 1000 } )
1991+ const clock = FakeTimers . install ( { now : 1000 , toFake : [ 'Date' ] } )
19921992 after ( ( ) => clock . uninstall ( ) )
19931993
19941994 const store = new MemoryCacheStore ( )
@@ -2024,7 +2024,7 @@ describe('Cache Interceptor', () => {
20242024 } )
20252025
20262026 test ( 'immutable response has deleteAt of ~1 year' , async ( ) => {
2027- const clock = FakeTimers . install ( { now : 1000 } )
2027+ const clock = FakeTimers . install ( { now : 1000 , toFake : [ 'Date' ] } )
20282028 after ( ( ) => clock . uninstall ( ) )
20292029
20302030 const store = new MemoryCacheStore ( )
@@ -2058,7 +2058,7 @@ describe('Cache Interceptor', () => {
20582058 } )
20592059
20602060 test ( 'stale-while-revalidate extends deleteAt beyond staleAt' , async ( ) => {
2061- const clock = FakeTimers . install ( { now : 1000 } )
2061+ const clock = FakeTimers . install ( { now : 1000 , toFake : [ 'Date' ] } )
20622062 after ( ( ) => clock . uninstall ( ) )
20632063
20642064 const store = new MemoryCacheStore ( )
0 commit comments