Skip to content

Commit 4b38744

Browse files
hiroppyitaloacasas
authored andcommitted
test: add process.assert's test
PR-URL: #10911 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Italo A. Casas <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 97ff432 commit 4b38744

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/parallel/test-process-assert.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict';
2+
require('../common');
3+
const assert = require('assert');
4+
5+
assert.strictEqual(process.assert(1, 'error'), undefined);
6+
assert.throws(() => {
7+
process.assert(undefined, 'errorMessage');
8+
}, /^Error: errorMessage$/);
9+
assert.throws(() => {
10+
process.assert(false);
11+
}, /^Error: assertion error$/);

0 commit comments

Comments
 (0)