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 18, 2016
1 parent accf410 commit 4e1d6d0
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 4e1d6d0

Please sign in to comment.