From cba5b2dea3648b37702fedff6d68f0f0672186be Mon Sep 17 00:00:00 2001 From: Abdullah Ali Date: Sat, 24 Nov 2018 14:11:45 +0200 Subject: [PATCH] test: Fix memory leak detection test with node LTS/Carbon. --- package.json | 2 +- test/test_native.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a43cd3b..f254e2c 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "prepublish": "npm run build && npm run typedoc && npm run test", "typedoc": "typedoc --out docs --target es6 --theme minimal --mode file src", "lint": "tslint -c tslint.json --project .", - "pretest": "npm run clean && npm run lint && npm run debug-build", + "pretest": "npm run clean && npm run lint && npm run build", "test": "nyc mocha --expose-gc --ui mocha-typescript test/test_**.ts", "coverage": "nyc report --reporter=text-lcov | coveralls", "watch": "mocha-typescript-watch", diff --git a/test/test_native.ts b/test/test_native.ts index 85c5dd0..86587e7 100644 --- a/test/test_native.ts +++ b/test/test_native.ts @@ -76,6 +76,6 @@ export class TestNative { } gc(); const memAfter = process.memoryUsage(); - assert.isAtMost(memAfter.external - memBefore.external, 1024); + assert.isAtMost(memAfter.external - memBefore.external, 1024 * 1024 * 5, 'possible memory leak detected'); } }