Browse Source

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>
v7.x
larissayvette 8 years ago
committed by James M Snell
parent
commit
8788d009f8
  1. 10
      test/parallel/test-debug-agent.js

10
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!');
}
);

Loading…
Cancel
Save