Skip to content

Commit

Permalink
test: add process.assert's test
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
hiroppy authored and italoacasas committed Jan 30, 2017
1 parent 97ff432 commit 4b38744
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/parallel/test-process-assert.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';
require('../common');
const assert = require('assert');

assert.strictEqual(process.assert(1, 'error'), undefined);
assert.throws(() => {
process.assert(undefined, 'errorMessage');
}, /^Error: errorMessage$/);
assert.throws(() => {
process.assert(false);
}, /^Error: assertion error$/);

0 comments on commit 4b38744

Please sign in to comment.