Skip to content

Commit 3cf27f1

Browse files
committed
test: add test-benchmark-process
Add minimal test to confirm that process benchmarks run. PR-URL: #14951 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent ce69d01 commit 3cf27f1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
'use strict';
2+
3+
require('../common');
4+
5+
// Minimal test for process benchmarks. This makes sure the benchmarks aren't
6+
// horribly broken but nothing more than that.
7+
8+
const assert = require('assert');
9+
const fork = require('child_process').fork;
10+
const path = require('path');
11+
12+
const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js');
13+
const argv = ['--set', 'millions=0.000001',
14+
'--set', 'n=1',
15+
'--set', 'type=raw',
16+
'process'];
17+
18+
const child = fork(runjs, argv);
19+
child.on('exit', (code, signal) => {
20+
assert.strictEqual(code, 0);
21+
assert.strictEqual(signal, null);
22+
});

0 commit comments

Comments
 (0)