mirror of
https://github.com/lovell/sharp.git
synced 2025-07-10 02:50:15 +02:00
* Switch from decompress-zip to extract-zip The former seems to hang when unzipping a ZIP64 file that uses the general purpose bit flag 3 as file entry. See: https://github.com/thejoshwolfe/yauzl#no-streaming-unzip-api * Prefer to call via static member instead Makes it clearer that a static method is being called. * `flatten-orange.jpg`: save without chroma subsampling To ensure no down-scaling of the Cr/Cb channels.
23 lines
573 B
JavaScript
23 lines
573 B
JavaScript
'use strict';
|
|
|
|
const detectLibc = require('detect-libc');
|
|
const sharp = require('../../');
|
|
|
|
const libcFamily = detectLibc.familySync();
|
|
const usingCache = libcFamily !== detectLibc.MUSL;
|
|
const usingSimd = !(process.env.G_DEBUG || process.env.VIPS_NOVECTOR);
|
|
const concurrency = process.env.VIPS_CONCURRENCY ||
|
|
(libcFamily === detectLibc.MUSL || process.arch === 'arm' ? 1 : undefined);
|
|
|
|
beforeEach(function () {
|
|
sharp.cache(usingCache);
|
|
sharp.simd(usingSimd);
|
|
sharp.concurrency(concurrency);
|
|
});
|
|
|
|
afterEach(function () {
|
|
if (global.gc) {
|
|
global.gc();
|
|
}
|
|
});
|