From b480b20e028085021b2c8634f2872d3cafea3ad8 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 19 Aug 2017 21:25:45 -0700 Subject: [PATCH] test: add test-benchmark-path Add minimal test to confirm that path benchmarks run. PR-URL: https://github.com/nodejs/node/pull/14951 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-benchmark-path.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/parallel/test-benchmark-path.js diff --git a/test/parallel/test-benchmark-path.js b/test/parallel/test-benchmark-path.js new file mode 100644 index 00000000000000..922a59f03cde8d --- /dev/null +++ b/test/parallel/test-benchmark-path.js @@ -0,0 +1,24 @@ +'use strict'; + +require('../common'); + +// Minimal test for path 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', 'n=1', + '--set', 'path=', + '--set', 'pathext=', + '--set', 'paths=', + '--set', 'props=', + 'path']; + +const child = fork(runjs, argv); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +});