Skip to content

Commit

Permalink
test: checking if error constructor is assert.AssertionError
Browse files Browse the repository at this point in the history
PR-URL: #9119
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
larissayvette authored and Myles Borins committed Nov 15, 2016
1 parent 6f78089 commit 02f7e3a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/parallel/test-debug-agent.js
Original file line number Diff line number Diff line change
@@ -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!');
}
);

0 comments on commit 02f7e3a

Please sign in to comment.