test: use expectsError in test-debug-agent.js
Use common.expectsError() in place of inline validation function in test-debug-agent.js. PR-URL: https://github.com/nodejs/node/pull/11410 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
48f8869685
commit
ca37ec084a
@ -1,12 +1,13 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const common = 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!');
|
||||
}
|
||||
common.expectsError(
|
||||
undefined,
|
||||
assert.AssertionError,
|
||||
'Debugger agent running without bindings!'
|
||||
)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user