From 41524282b59e8999a1399ee4dc646d61b5e2af6b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 27 Jan 2020 07:32:47 -0800 Subject: [PATCH] test,benchmark: fix test-benchmark-zlib PR-URL: https://github.com/nodejs/node/pull/31538 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- benchmark/zlib/deflate.js | 2 ++ benchmark/zlib/inflate.js | 2 ++ test/benchmark/test-benchmark-zlib.js | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/benchmark/zlib/deflate.js b/benchmark/zlib/deflate.js index 5e86d659803747..6d3bda90c6fdfa 100644 --- a/benchmark/zlib/deflate.js +++ b/benchmark/zlib/deflate.js @@ -9,6 +9,8 @@ const bench = common.createBenchmark(main, { }); function main({ n, method, inputLen }) { + // Default method value for testing. + method = method || 'deflate'; const chunk = Buffer.alloc(inputLen, 'a'); var i = 0; diff --git a/benchmark/zlib/inflate.js b/benchmark/zlib/inflate.js index 11bc2cce700b40..09379c00c1250b 100644 --- a/benchmark/zlib/inflate.js +++ b/benchmark/zlib/inflate.js @@ -9,6 +9,8 @@ const bench = common.createBenchmark(main, { }); function main({ n, method, inputLen }) { + // Default method value for tests. + method = method || 'inflate'; const chunk = zlib.deflateSync(Buffer.alloc(inputLen, 'a')); let i = 0; diff --git a/test/benchmark/test-benchmark-zlib.js b/test/benchmark/test-benchmark-zlib.js index 4b7e340b8f7abf..adc7e3d47b040d 100644 --- a/test/benchmark/test-benchmark-zlib.js +++ b/test/benchmark/test-benchmark-zlib.js @@ -10,7 +10,7 @@ runBenchmark('zlib', 'chunkLen=1024', 'duration=0.001', 'inputLen=1024', - 'method=deflate', + 'method=', 'n=1', 'options=true', 'type=Deflate',