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 <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
pull/12788/merge
Daniel Bevenius 2017-05-24 05:46:57 +02:00
parent 196190015d
commit ab28e0a86a
1 changed files with 3 additions and 2 deletions

View File

@ -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': ''