Skip to content

Commit 97748c6

Browse files
TrottMyles Borins
authored and
Myles Borins
committedNov 11, 2016
test: move module out of fixture directory
tick-processor-base.js is a module used by three other tests. It is not a test fixture so move it out of the fixture directory. (One downside to having it in the fixture directory is that fixture code is not currently linted.) It is possible that the code in tick-processor-base.js should be integrated into common.js. This can potentially happen subsequently (and might make a reasonable good first contribution for a new contributor). PR-URL: #9022 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 0a2a39c commit 97748c6

4 files changed

+5
-8
lines changed
 

‎test/parallel/test-tick-processor-builtin.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22
const common = require('../common');
3-
const path = require('path');
43

54
if (common.isWindows ||
65
common.isSunOS ||
@@ -16,7 +15,7 @@ if (!common.enoughTestCpu) {
1615
return;
1716
}
1817

19-
const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));
18+
const base = require('./tick-processor-base.js');
2019

2120
base.runTest({
2221
pattern: /Builtin_DateNow/,

‎test/parallel/test-tick-processor-cpp-core.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22
const common = require('../common');
3-
const path = require('path');
43

54
if (common.isWindows ||
65
common.isSunOS ||
@@ -16,7 +15,7 @@ if (!common.enoughTestCpu) {
1615
return;
1716
}
1817

19-
const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));
18+
const base = require('./tick-processor-base.js');
2019

2120
base.runTest({
2221
pattern: /RunInDebugContext/,

‎test/parallel/test-tick-processor-unknown.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22
const common = require('../common');
3-
const path = require('path');
43

54
// TODO(mhdawson) Currently the test-tick-processor functionality in V8
65
// depends on addresses being smaller than a full 64 bits. Aix supports
@@ -17,7 +16,7 @@ if (!common.enoughTestCpu) {
1716
return;
1817
}
1918

20-
const base = require(path.join(common.fixturesDir, 'tick-processor-base.js'));
19+
const base = require('./tick-processor-base.js');
2120

2221
// Unknown checked for to prevent flakiness, if pattern is not found,
2322
// then a large number of unknown ticks should be present

‎test/fixtures/tick-processor-base.js ‎test/parallel/tick-processor-base.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function runTest(test) {
2020
});
2121

2222
let ticks = '';
23-
proc.stdout.on('data', chunk => ticks += chunk);
23+
proc.stdout.on('data', (chunk) => ticks += chunk);
2424

2525
// Try to match after timeout
2626
setTimeout(() => {
@@ -41,7 +41,7 @@ function match(pattern, parent, ticks) {
4141
});
4242

4343
let out = '';
44-
proc.stdout.on('data', chunk => out += chunk);
44+
proc.stdout.on('data', (chunk) => out += chunk);
4545
proc.stdout.once('end', () => {
4646
proc.once('exit', () => {
4747
fs.unlinkSync(LOG_FILE);

0 commit comments

Comments
 (0)