Skip to content

Commit

Permalink
test: skip test-bindings if inspector is disabled
Browse files Browse the repository at this point in the history
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: #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>
  • Loading branch information
danbev authored and jasnell committed May 28, 2017
1 parent a590709 commit 4030aed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/inspector/test-bindings.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down Expand Up @@ -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': ''
Expand Down

0 comments on commit 4030aed

Please sign in to comment.