Skip to content

Commit b2475e9

Browse files
committed
add expose-gc
1 parent f453926 commit b2475e9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build": "rm -fr ./build && tsc -p tsconfig.lib.json",
1212
"release": "standard-version",
1313
"test": "jest",
14-
"test:ci": "jest --ci --bail",
14+
"test:ci": "jest --ci --expose-gc --bail",
1515
"type-check": "tsc -p tsconfig.lib.json"
1616
},
1717
"prettier": {

test/integration/v2/stream.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,10 @@ describe("streams", () => {
330330
if (rowCount % 5000 === 0) {
331331
const currentMemory = process.memoryUsage();
332332
maxMemoryUsed = Math.max(maxMemoryUsed, currentMemory.heapUsed);
333+
if (global.gc) {
334+
console.log(`Invoking GC at row ${rowCount}`);
335+
global.gc();
336+
}
333337
}
334338

335339
// Verify data types are correct for normalized data on first row

0 commit comments

Comments
 (0)