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 <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
hiroppy authored and MylesBorins committed Mar 9, 2017
1 parent c9a92ff commit 6ca9901
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 6ca9901

Please sign in to comment.