mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 05:36:18 +01:00
Force V8 GC after each test during leak checks
This commit is contained in:
@@ -16,5 +16,5 @@ for test in ./test/unit/*.js; do
|
|||||||
--show-leak-kinds=definite,indirect,possible \
|
--show-leak-kinds=definite,indirect,possible \
|
||||||
--num-callers=20 \
|
--num-callers=20 \
|
||||||
--trace-children=yes \
|
--trace-children=yes \
|
||||||
node node_modules/.bin/mocha --slow=60000 --timeout=120000 --file test/unit/beforeEach.js "$test";
|
node --expose-gc node_modules/.bin/mocha --slow=60000 --timeout=120000 --file test/unit/beforeEach.js "$test";
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -12,3 +12,9 @@ beforeEach(function () {
|
|||||||
sharp.simd(usingSimd);
|
sharp.simd(usingSimd);
|
||||||
sharp.concurrency(concurrency);
|
sharp.concurrency(concurrency);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterEach(function () {
|
||||||
|
if (global.gc) {
|
||||||
|
global.gc();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user