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

Commit

Permalink
Fix test-gc script
Browse files Browse the repository at this point in the history
Cherry-picked from Level/leveldown#691
  • Loading branch information
vweevers committed Nov 4, 2019
1 parent 56c7c80 commit 2c41d3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"install": "node-gyp-build",
"test": "standard && hallmark && (nyc -s tape test/*-test.js | faucet) && nyc report",
"test-gc": "npx -n=--expose-gc tape test/{cleanup,iterator-gc,chained-batch-gc}*-test.js",
"test-gc": "node --expose-gc test/gc.js",
"test-electron": "electron test/electron.js",
"test-prebuild": "cross-env PREBUILDS_ONLY=1 npm t",
"coverage": "nyc report --reporter=text-lcov | coveralls",
Expand Down
12 changes: 12 additions & 0 deletions test/gc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict'

// A special entry point to run certain tests with forced gc.

if (!global.gc) {
console.error('Run with node --expose-gc')
process.exit(1)
}

require('./cleanup-hanging-iterators-test')
require('./iterator-gc-test')
require('./chained-batch-gc-test')

0 comments on commit 2c41d3b

Please sign in to comment.