Skip to content

Commit

Permalink
test: replaces fixturesDir with fixtures
Browse files Browse the repository at this point in the history
PR-URL: #15838
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
  • Loading branch information
Alireza Alidousti authored and MylesBorins committed Oct 11, 2017
1 parent 50cae5c commit b1e6373
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions test/parallel/test-inspector-invalid-args.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');

common.skipIfInspectorDisabled();

const assert = require('assert');
const execFile = require('child_process').execFile;
const path = require('path');

const mainScript = path.join(common.fixturesDir, 'loop.js');
const mainScript = fixtures.path('loop.js');
const expected =
'`node --debug` and `node --debug-brk` are invalid. ' +
'Please use `node --inspect` or `node --inspect-brk` instead.';
for (const invalidArg of ['--debug-brk', '--debug']) {
execFile(
process.execPath,
[ invalidArg, mainScript ],
[invalidArg, mainScript],
common.mustCall((error, stdout, stderr) => {
assert.strictEqual(error.code, 9, `node ${invalidArg} should exit 9`);
assert.strictEqual(stderr.includes(expected), true,
`${stderr} should include '${expected}'`);
assert.strictEqual(
stderr.includes(expected),
true,
`${stderr} should include '${expected}'`
);
})
);
}

0 comments on commit b1e6373

Please sign in to comment.