Skip to content

Commit

Permalink
updating sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredwray committed Dec 11, 2024
1 parent 46b8d47 commit 96ed718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cacheable/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,12 +561,12 @@ describe('cacheable ttl parsing', async () => {
});

test('setMany without ttl', async () => {
const cacheable = new Cacheable({ttl: 2});
const cacheable = new Cacheable({ttl: 50});
const list = [{key: 'key1', value: 'value1'}, {key: 'key2', value: 'value2'}];
await cacheable.setMany(list);
const firstResult = await cacheable.getMany(['key1', 'key2']);
expect(firstResult).toEqual(['value1', 'value2']);
await sleep(5);
await sleep(100);
const result = await cacheable.getMany(['key1', 'key2']);
expect(result).toEqual([undefined, undefined]);
});
Expand Down

0 comments on commit 96ed718

Please sign in to comment.