From 2c742719002cf0f2e25786fef9052cfcedc4a338 Mon Sep 17 00:00:00 2001 From: Remy Suen Date: Sun, 26 Mar 2017 21:56:54 +0900 Subject: [PATCH] Expose the Node.js GC when running `mocha `scripts The memory leak tests rely on the global.gc() function being available. The GC needs to be exposed if the `mocha` or `mochaDebug` script is being run. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ff52b8d84..0f1921b92 100644 --- a/package.json +++ b/package.json @@ -77,8 +77,8 @@ "installDebug": "BUILD_DEBUG=true npm install", "lint": "jshint lib test/tests test/utils examples lifecycleScripts", "mergecov": "lcov-result-merger 'test/**/*.info' 'test/coverage/merged.lcov' && ./lcov-1.10/bin/genhtml test/coverage/merged.lcov --output-directory test/coverage/report", - "mocha": "mocha test/runner test/tests --timeout 15000", - "mochaDebug": "mocha --debug-brk test/runner test/tests --timeout 15000", + "mocha": "mocha --expose-gc test/runner test/tests --timeout 15000", + "mochaDebug": "mocha --expose-gc --debug-brk test/runner test/tests --timeout 15000", "postinstall": "node lifecycleScripts/postinstall", "prepublish": "npm run babel", "rebuild": "node generate && npm run babel && node-gyp configure build",