File tree Expand file tree Collapse file tree
packages/cli-kit/src/private/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -474,6 +474,7 @@ describe('runWithRateLimit', () => {
474474 test ( 'throttles the task when the cache is populated recently' , async ( ) => {
475475 await inTemporaryDirectory ( async ( cwd ) => {
476476 // Given
477+ vi . useFakeTimers ( )
477478 const config = new LocalStorage < any > ( { cwd} )
478479 for ( let i = 0 ; i < limit ; i ++ ) {
479480 // eslint-disable-next-line no-await-in-loop
@@ -511,6 +512,7 @@ describe('runWithRateLimit', () => {
511512 test ( "runs the task as usual when the cache is populated recently but the rate limit isn't used up" , async ( ) => {
512513 await inTemporaryDirectory ( async ( cwd ) => {
513514 // Given
515+ vi . useFakeTimers ( )
514516 const config = new LocalStorage < any > ( { cwd} )
515517 // Run the task once, but the rate limit is 2
516518 await runWithRateLimit (
You can’t perform that action at this time.
0 commit comments