Skip to content

Commit 02f7e3a

Browse files
larissayvetteMyles Borins
authored and
Myles Borins
committedNov 15, 2016
test: checking if error constructor is assert.AssertionError
PR-URL: #9119 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 6f78089 commit 02f7e3a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎test/parallel/test-debug-agent.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
'use strict';
22
require('../common');
33
const assert = require('assert');
4+
const debug = require('_debug_agent');
45

5-
assert.throws(() => { require('_debug_agent').start(); },
6-
assert.AssertionError);
6+
assert.throws(
7+
() => { debug.start(); },
8+
function(err) {
9+
return (err instanceof assert.AssertionError &&
10+
err.message === 'Debugger agent running without bindings!');
11+
}
12+
);

0 commit comments

Comments
 (0)
Please sign in to comment.