From ab28e0a86a82eb3f7363b980fcb91261d7e7a2a0 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 24 May 2017 05:46:57 +0200 Subject: [PATCH] test: skip test-bindings if inspector is disabled If node is configured --without-inspector/--without-ssl this test will fail with the following error: Path: inspector/test-bindings inspector.js:8 throw new Error('Inspector is not available'); ^ Error: Inspector is not available at inspector.js:8:9 at NativeModule.compile (bootstrap_node.js:549:7) This commit skips this test if the inspector is disabled. PR-URL: https://github.com/nodejs/node/pull/13186 Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Michael Dawson Reviewed-By: Eugene Ostroukhov Reviewed-By: Richard Lau --- test/inspector/test-bindings.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/inspector/test-bindings.js b/test/inspector/test-bindings.js index 07f12cbee5b..127f5cf2b80 100644 --- a/test/inspector/test-bindings.js +++ b/test/inspector/test-bindings.js @@ -1,5 +1,6 @@ 'use strict'; -require('../common'); +const common = require('../common'); +common.skipIfInspectorDisabled(); const assert = require('assert'); const inspector = require('inspector'); const path = require('path'); @@ -81,7 +82,7 @@ function testSampleDebugSession() { }, TypeError); session.post('Debugger.enable', () => cbAsSecondArgCalled = true); session.post('Debugger.setBreakpointByUrl', { - 'lineNumber': 11, + 'lineNumber': 12, 'url': path.resolve(__dirname, __filename), 'columnNumber': 0, 'condition': ''