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