From c09d55bc331adffe4fa398a03b66412722e03b5a Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 24 May 2017 05:46:57 +0200 Subject: [PATCH 1/2] 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. --- test/inspector/test-bindings.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/inspector/test-bindings.js b/test/inspector/test-bindings.js index 07f12cbee5b8cd..366344b9bc67f8 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'); From 06e52b145a0802637cd76bdc7fb19b122795b271 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 24 May 2017 08:48:56 +0200 Subject: [PATCH 2/2] increment line number after adding check --- test/inspector/test-bindings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/inspector/test-bindings.js b/test/inspector/test-bindings.js index 366344b9bc67f8..127f5cf2b80b88 100644 --- a/test/inspector/test-bindings.js +++ b/test/inspector/test-bindings.js @@ -82,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': ''