node/test/parallel/test-debug-agent.js
larissayvette 4e1d6d0d68 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>
2016-10-18 15:45:03 -07:00

13 lines
303 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
const debug = require('_debug_agent');
assert.throws(
() => { debug.start(); },
function(err) {
return (err instanceof assert.AssertionError &&
err.message === 'Debugger agent running without bindings!');
}
);