diff --git a/test/parallel/test-debug-agent.js b/test/parallel/test-debug-agent.js index 0bb5d7f9be25df..d65029e5855b26 100644 --- a/test/parallel/test-debug-agent.js +++ b/test/parallel/test-debug-agent.js @@ -1,6 +1,12 @@ 'use strict'; require('../common'); const assert = require('assert'); +const debug = require('_debug_agent'); -assert.throws(() => { require('_debug_agent').start(); }, - assert.AssertionError); +assert.throws( + () => { debug.start(); }, + function(err) { + return (err instanceof assert.AssertionError && + err.message === 'Debugger agent running without bindings!'); + } +);