From 7dfeb36143a37b5f11766220a6408b9e6124a53b Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 31 May 2017 07:23:40 +0200 Subject: [PATCH] test: check inspector support in test/inspector When configuring node --without-ssl or --without-inspector these test will fail. The underlying issue will be: Inspector support is not available with this Node.js build /work/nodejs/node/out/Release/node: bad option: --inspect=0 This commit adds checks to see if inspector support is enabled and if not skips these tests. PR-URL: https://github.com/nodejs/node/pull/13324 Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig Reviewed-By: Eugene Ostroukhov Reviewed-By: Sam Roberts Reviewed-By: James M Snell --- test/inspector/test-inspector-port-zero-cluster.js | 1 + test/inspector/test-inspector-port-zero.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/inspector/test-inspector-port-zero-cluster.js b/test/inspector/test-inspector-port-zero-cluster.js index fad25d4c84..45282c9d2e 100644 --- a/test/inspector/test-inspector-port-zero-cluster.js +++ b/test/inspector/test-inspector-port-zero-cluster.js @@ -2,6 +2,7 @@ 'use strict'; const common = require('../common'); +common.skipIfInspectorDisabled(); const assert = require('assert'); const cluster = require('cluster'); diff --git a/test/inspector/test-inspector-port-zero.js b/test/inspector/test-inspector-port-zero.js index e66c439208..182dd50dd4 100644 --- a/test/inspector/test-inspector-port-zero.js +++ b/test/inspector/test-inspector-port-zero.js @@ -1,6 +1,7 @@ 'use strict'; -const { mustCall } = require('../common'); +const { mustCall, skipIfInspectorDisabled } = require('../common'); +skipIfInspectorDisabled(); const assert = require('assert'); const { URL } = require('url'); const { spawn } = require('child_process');