Skip to content

Commit

Permalink
Increase waiting time... just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Jan 9, 2023
1 parent f299d33 commit a9009b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ describe('Utilities', function () {
it('Can be disabled', async function () {
let cache;
for (let i = 0; i < 10; i++) {
await new Promise(resolve => setTimeout(resolve, 100));
gc();
cache = sharp.cache(false);
if (cache.memory.current === 0) break;
await new Promise(resolve => setTimeout(resolve, 10));
gc();
}
assert.strictEqual(cache.memory.current, 0);
assert.strictEqual(cache.memory.max, 0);
Expand Down

0 comments on commit a9009b8

Please sign in to comment.