From 8e7ba6ff1845dae31293b308fb1492929736bdde 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. --- 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 fad25d4c844fb0..45282c9d2e66cc 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 e66c4392081aa2..182dd50dd4dea9 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');