mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
22 lines
406 B
JavaScript
22 lines
406 B
JavaScript
'use strict';
|
|
|
|
const sharp = require('../');
|
|
|
|
const usingCache = !process.env.G_DEBUG;
|
|
const usingSimd = !process.env.VIPS_NOVECTOR;
|
|
const concurrency = Number(process.env.VIPS_CONCURRENCY) || 0;
|
|
|
|
exports.mochaHooks = {
|
|
beforeEach () {
|
|
sharp.cache(usingCache);
|
|
sharp.simd(usingSimd);
|
|
sharp.concurrency(concurrency);
|
|
},
|
|
|
|
afterEach () {
|
|
if (global.gc) {
|
|
global.gc();
|
|
}
|
|
}
|
|
};
|