From 708460e647a5b049fc09b28b9087cfe11c68c494 Mon Sep 17 00:00:00 2001 From: Arseniy Maximov Date: Thu, 16 Feb 2017 03:35:34 +0300 Subject: [PATCH] test: use expectsError in test-debug-agent.js Use common.expectsError() in place of inline validation function in test-debug-agent.js. --- test/parallel/test-debug-agent.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-debug-agent.js b/test/parallel/test-debug-agent.js index d65029e5855b26..d2f57a0bf80550 100644 --- a/test/parallel/test-debug-agent.js +++ b/test/parallel/test-debug-agent.js @@ -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!' + ) );