Skip to content

Commit

Permalink
test: use expectsError in test-debug-agent.js
Browse files Browse the repository at this point in the history
Use common.expectsError() in place of inline validation function in
test-debug-agent.js.

PR-URL: #11410
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
notarseniy authored and italoacasas committed Feb 25, 2017
1 parent 8e455a9 commit ea29d48
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/parallel/test-debug-agent.js
Original file line number Diff line number Diff line change
@@ -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!'
)
);

0 comments on commit ea29d48

Please sign in to comment.