Browse Source

test: add process.assert's test

PR-URL: https://github.com/nodejs/node/pull/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>
v6
abouthiroppy 8 years ago
committed by Luigi Pinca
parent
commit
aa4fe92392
  1. 11
      test/parallel/test-process-assert.js

11
test/parallel/test-process-assert.js

@ -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$/);
Loading…
Cancel
Save