test: rearrange inspector headers into convention

Test guide describes a conventional layout for test headers, review
inspector tests and reorganize to follow the convention.

PR-URL: https://github.com/nodejs/node/pull/13428
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Sam Roberts 2017-06-02 19:30:25 -07:00
parent 062071a9c3
commit aae0d4559c
8 changed files with 16 additions and 5 deletions

View File

@ -1,6 +1,8 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
const helper = require('./inspector-helper.js');

View File

@ -1,5 +1,6 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');

View File

@ -1,8 +1,9 @@
// Flags: --inspect=0
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
const cluster = require('cluster');

View File

@ -1,7 +1,8 @@
'use strict';
const { mustCall, skipIfInspectorDisabled } = require('../common');
skipIfInspectorDisabled();
const assert = require('assert');
const { URL } = require('url');
const { spawn } = require('child_process');

View File

@ -1,5 +1,6 @@
'use strict';
require('../common');
const spawn = require('child_process').spawn;
const child = spawn(process.execPath,

View File

@ -1,6 +1,8 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
const helper = require('./inspector-helper.js');

View File

@ -1,7 +1,9 @@
'use strict';
// Flags: --inspect={PORT}
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
const cluster = require('cluster');
const debuggerPort = common.PORT;

View File

@ -1,11 +1,12 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
const execFile = require('child_process').execFile;
const path = require('path');
const common = require('../common');
common.skipIfInspectorDisabled();
const mainScript = path.join(common.fixturesDir, 'loop.js');
const expected =
'`node --debug` and `node --debug-brk` are invalid. ' +