From bfe1ef5598129206b0f1d2b23a3326f61f232854 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 10 Aug 2017 23:05:48 -0700 Subject: [PATCH] test: add test-benchmark-zlib Add minimal test to confirm that zlib benchmarks run. --- test/parallel/test-benchmark-zlib.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/parallel/test-benchmark-zlib.js diff --git a/test/parallel/test-benchmark-zlib.js b/test/parallel/test-benchmark-zlib.js new file mode 100644 index 00000000000000..20552c1f9e2309 --- /dev/null +++ b/test/parallel/test-benchmark-zlib.js @@ -0,0 +1,23 @@ +'use strict'; + +require('../common'); + +// Minimal test for zlib benchmarks. This makes sure the benchmarks aren't +// horribly broken but nothing more than that. + +const assert = require('assert'); +const fork = require('child_process').fork; +const path = require('path'); + +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); +const argv = ['--set', 'method=deflate', + '--set', 'n=1', + '--set', 'options=true', + '--set', 'type=Deflate', + 'zlib']; + +const child = fork(runjs, argv); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +});