mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Tests: attempt to reduce chance of race condition
This commit is contained in:
parent
3a0c375692
commit
c9e3996007
@ -9,7 +9,8 @@ const sharp = require('../../');
|
||||
|
||||
describe('Utilities', function () {
|
||||
describe('Cache', function () {
|
||||
it('Can be disabled', function () {
|
||||
it('Can be disabled', function (done) {
|
||||
queueMicrotask(() => {
|
||||
sharp.cache(false);
|
||||
const cache = sharp.cache(false);
|
||||
assert.strictEqual(cache.memory.current, 0);
|
||||
@ -19,6 +20,8 @@ describe('Utilities', function () {
|
||||
assert.strictEqual(cache.files.max, 0);
|
||||
assert.strictEqual(cache.items.current, 0);
|
||||
assert.strictEqual(cache.items.max, 0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('Can be enabled with defaults', function () {
|
||||
const cache = sharp.cache(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user