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 <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
larissayvette authored and jasnell committed Oct 19, 2016
1 parent 1791500 commit 8788d00
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/parallel/test-debug-agent.js
@@ -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 8788d00

Please sign in to comment.