mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
test: checking if error constructor is assert.AssertionError
PR-URL: https://github.com/nodejs/node/pull/9119 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
6f780893eb
commit
02f7e3aca3
1 file changed
+8
-2
@@ -1,6 +1,12 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
const debug = require('_debug_agent');
|
||||
|
||||
assert.throws(() => { require('_debug_agent').start(); },
|
||||
assert.AssertionError);
|
||||
assert.throws(
|
||||
() => { debug.start(); },
|
||||
function(err) {
|
||||
return (err instanceof assert.AssertionError &&
|
||||
err.message === 'Debugger agent running without bindings!');
|
||||
}
|
||||
);
|
||||
Reference in new issue
Block a user