mirror of https://github.com/lukechilds/node.git
Browse Source
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
1 changed files with 11 additions and 0 deletions
@ -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…
Reference in new issue