We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50cae5c commit b1e6373Copy full SHA for b1e6373
1 file changed
test/parallel/test-inspector-invalid-args.js
@@ -1,24 +1,27 @@
1
'use strict';
2
const common = require('../common');
3
+const fixtures = require('../common/fixtures');
4
5
common.skipIfInspectorDisabled();
6
7
const assert = require('assert');
8
const execFile = require('child_process').execFile;
-const path = require('path');
9
10
-const mainScript = path.join(common.fixturesDir, 'loop.js');
+const mainScript = fixtures.path('loop.js');
11
const expected =
12
'`node --debug` and `node --debug-brk` are invalid. ' +
13
'Please use `node --inspect` or `node --inspect-brk` instead.';
14
for (const invalidArg of ['--debug-brk', '--debug']) {
15
execFile(
16
process.execPath,
17
- [ invalidArg, mainScript ],
+ [invalidArg, mainScript],
18
common.mustCall((error, stdout, stderr) => {
19
assert.strictEqual(error.code, 9, `node ${invalidArg} should exit 9`);
20
- assert.strictEqual(stderr.includes(expected), true,
21
- `${stderr} should include '${expected}'`);
+ assert.strictEqual(
+ stderr.includes(expected),
22
+ true,
23
+ `${stderr} should include '${expected}'`
24
+ );
25
})
26
);
27
}
0 commit comments