Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit 2c41d3b

Browse files
committed
Fix test-gc script
Cherry-picked from Level/leveldown#691
1 parent 56c7c80 commit 2c41d3b

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"install": "node-gyp-build",
99
"test": "standard && hallmark && (nyc -s tape test/*-test.js | faucet) && nyc report",
10-
"test-gc": "npx -n=--expose-gc tape test/{cleanup,iterator-gc,chained-batch-gc}*-test.js",
10+
"test-gc": "node --expose-gc test/gc.js",
1111
"test-electron": "electron test/electron.js",
1212
"test-prebuild": "cross-env PREBUILDS_ONLY=1 npm t",
1313
"coverage": "nyc report --reporter=text-lcov | coveralls",

test/gc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict'
2+
3+
// A special entry point to run certain tests with forced gc.
4+
5+
if (!global.gc) {
6+
console.error('Run with node --expose-gc')
7+
process.exit(1)
8+
}
9+
10+
require('./cleanup-hanging-iterators-test')
11+
require('./iterator-gc-test')
12+
require('./chained-batch-gc-test')

0 commit comments

Comments
 (0)