Skip to content

Commit ea29d48

Browse files
notarseniyitaloacasas
authored andcommitted
test: use expectsError in test-debug-agent.js
Use common.expectsError() in place of inline validation function in test-debug-agent.js. PR-URL: #11410 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 8e455a9 commit ea29d48

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/parallel/test-debug-agent.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
'use strict';
2-
require('../common');
2+
const common = require('../common');
33
const assert = require('assert');
44
const debug = require('_debug_agent');
55

66
assert.throws(
77
() => { debug.start(); },
8-
function(err) {
9-
return (err instanceof assert.AssertionError &&
10-
err.message === 'Debugger agent running without bindings!');
11-
}
8+
common.expectsError(
9+
undefined,
10+
assert.AssertionError,
11+
'Debugger agent running without bindings!'
12+
)
1213
);

0 commit comments

Comments
 (0)