Skip to content

Commit a2b103a

Browse files
aduh95danielleadams
authored andcommitted
test: add trailing commas in test/pummel
PR-URL: #46610 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent 7eb1456 commit a2b103a

36 files changed

+175
-176
lines changed

test/.eslintrc.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ overrides:
7676
- es-module/*.mjs
7777
- parallel/*.js
7878
- parallel/*.mjs
79-
- pummel/*.js
8079
- sequential/*.js
8180
- sequential/*.mjs
8281
rules:

test/pummel/test-crypto-timing-safe-equal-benchmarks.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const T_THRESHOLD = 3.892;
108108
const t = getTValue(crypto.timingSafeEqual);
109109
assert(
110110
Math.abs(t) < T_THRESHOLD,
111-
`timingSafeEqual should not leak information from its execution time (t=${t})`
111+
`timingSafeEqual should not leak information from its execution time (t=${t})`,
112112
);
113113

114114
// As a coherence check to make sure the statistical tests are working, run the
@@ -118,5 +118,5 @@ const unsafeCompare = (bufA, bufB) => bufA.equals(bufB);
118118
const t2 = getTValue(unsafeCompare);
119119
assert(
120120
Math.abs(t2) > T_THRESHOLD,
121-
`Buffer#equals should leak information from its execution time (t=${t2})`
121+
`Buffer#equals should leak information from its execution time (t=${t2})`,
122122
);

test/pummel/test-dh-regr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ for (let i = 0; i < 2000; i++) {
5454
bSecret,
5555
'Secrets should be equal.\n' +
5656
`aSecret: ${aSecret.toString('base64')}\n` +
57-
`bSecret: ${bSecret.toString('base64')}`
57+
`bSecret: ${bSecret.toString('base64')}`,
5858
);
5959
}

test/pummel/test-fs-readfile-tostring-fail.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tmpdir.refresh();
1818

1919
const file = path.join(tmpdir.path, 'toobig.txt');
2020
const stream = fs.createWriteStream(file, {
21-
flags: 'a'
21+
flags: 'a',
2222
});
2323

2424
stream.on('error', (err) => { throw err; });
@@ -44,7 +44,7 @@ stream.on('finish', common.mustCall(function() {
4444
message: 'Cannot create a string longer than ' +
4545
`0x${stringLengthHex} characters`,
4646
code: 'ERR_STRING_TOO_LONG',
47-
name: 'Error'
47+
name: 'Error',
4848
})(err);
4949
}
5050
assert.strictEqual(buf, undefined);

test/pummel/test-fs-watch-file.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fs.writeFileSync(filepathOne, 'hello');
5858

5959
assert.throws(
6060
() => { fs.watchFile(filepathOne); },
61-
{ code: 'ERR_INVALID_ARG_TYPE' }
61+
{ code: 'ERR_INVALID_ARG_TYPE' },
6262
);
6363

6464
// Does not throw.
@@ -78,7 +78,7 @@ fs.writeFileSync(filepathTwoAbs, 'howdy');
7878

7979
assert.throws(
8080
() => { fs.watchFile(filepathTwo); },
81-
{ code: 'ERR_INVALID_ARG_TYPE' }
81+
{ code: 'ERR_INVALID_ARG_TYPE' },
8282
);
8383

8484
{ // Does not throw.

test/pummel/test-heapdump-dns.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ validateSnapshotNodes('Node / ChannelWrap', [
1414
// `Node / ChannelWrap` (C++) -> `ChannelWrap` (JS)
1515
{ node_name: 'ChannelWrap', edge_name: 'native_to_javascript' },
1616
],
17-
detachedness: 2
17+
detachedness: 2,
1818
},
1919
]);

test/pummel/test-heapdump-env.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ validateSnapshotNodes('Node / Environment', [{
1818
{ node_name: 'Node / CleanupQueue', edge_name: 'cleanup_queue' },
1919
{ node_name: 'Node / IsolateData', edge_name: 'isolate_data' },
2020
{ node_name: 'Node / Realm', edge_name: 'principal_realm' },
21-
]
21+
],
2222
}]);
2323

2424
validateSnapshotNodes('Node / CleanupQueue', [
@@ -28,14 +28,14 @@ validateSnapshotNodes('Node / CleanupQueue', [
2828
{
2929
children: [
3030
{ node_name: 'Node / ContextifyScript' },
31-
]
31+
],
3232
},
3333
]);
3434

3535
validateSnapshotNodes('Node / Realm', [{
3636
children: [
3737
{ node_name: 'process', edge_name: 'process_object' },
38-
]
38+
],
3939
}]);
4040

4141
console.log(context); // Make sure it's not GC'ed

test/pummel/test-heapdump-fs-promise.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ validateSnapshotNodes('Node / FSReqPromise', [
1111
children: [
1212
{ node_name: 'FSReqPromise', edge_name: 'native_to_javascript' },
1313
{ node_name: 'Float64Array', edge_name: 'stats_field_array' },
14-
]
14+
],
1515
},
1616
]);

test/pummel/test-heapdump-http2.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ server.listen(0, () => {
2929
children: [
3030
// current_headers and/or queue could be empty
3131
{ node_name: 'Http2Stream', edge_name: 'native_to_javascript' },
32-
]
32+
],
3333
},
3434
], { loose: true });
3535

@@ -39,29 +39,29 @@ server.listen(0, () => {
3939
children: [
4040
{ node_name: 'FileHandle', edge_name: 'native_to_javascript' },
4141
// current_headers could be empty
42-
]
42+
],
4343
},
4444
], { loose: true });
4545
state.validateSnapshotNodes('Node / TCPSocketWrap', [
4646
{
4747
children: [
4848
{ node_name: 'TCP', edge_name: 'native_to_javascript' },
49-
]
49+
],
5050
},
5151
], { loose: true });
5252
state.validateSnapshotNodes('Node / TCPServerWrap', [
5353
{
5454
children: [
5555
{ node_name: 'TCP', edge_name: 'native_to_javascript' },
56-
]
56+
],
5757
},
5858
], { loose: true });
5959
// `Node / StreamPipe` (C++) -> StreamPipe (JS)
6060
state.validateSnapshotNodes('Node / StreamPipe', [
6161
{
6262
children: [
6363
{ node_name: 'StreamPipe', edge_name: 'native_to_javascript' },
64-
]
64+
],
6565
},
6666
]);
6767
// `Node / Http2Session` (C++) -> Http2Session (JS)
@@ -71,11 +71,11 @@ server.listen(0, () => {
7171
{ node_name: 'Http2Session', edge_name: 'native_to_javascript' },
7272
{ node_name: 'Node / nghttp2_memory', edge_name: 'nghttp2_memory' },
7373
{
74-
node_name: 'Node / streams', edge_name: 'streams'
74+
node_name: 'Node / streams', edge_name: 'streams',
7575
},
7676
// outstanding_pings, outgoing_buffers, outgoing_storage,
7777
// pending_rst_streams could be empty
78-
]
78+
],
7979
},
8080
], { loose: true });
8181
}));

test/pummel/test-heapdump-inspector.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const inspector = require('inspector');
1010
const snapshotNode = {
1111
children: [
1212
{ node_name: 'Node / InspectorSession', edge_name: 'session' },
13-
]
13+
],
1414
};
1515

1616
// Starts with no JSBindingsConnection (or 1 if coverage enabled).
@@ -34,7 +34,7 @@ const snapshotNode = {
3434
(edge) => edge.name === 'callback' &&
3535
(edge.to.type === undefined || // embedded graph
3636
edge.to.type === 'closure'), // snapshot
37-
]
37+
],
3838
},
3939
];
4040
if (process.env.NODE_V8_COVERAGE) {

test/pummel/test-heapdump-tls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const server = net.createServer(common.mustCall((c) => {
2929
// `Node / TLSWrap` (C++) -> `TLSWrap` (JS)
3030
{ node_name: 'TLSWrap', edge_name: 'native_to_javascript' },
3131
// pending_cleartext_input could be empty
32-
]
32+
],
3333
},
3434
]);
3535
}));

test/pummel/test-heapdump-worker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ validateSnapshotNodes('Node / MessagePort', [
1010
{
1111
children: [
1212
{ node_name: 'Node / MessagePortData', edge_name: 'data' },
13-
]
13+
],
1414
},
1515
], { loose: true });
1616
worker.terminate();

test/pummel/test-heapdump-zlib.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ validateSnapshotNodes('Node / ZlibStream', [
1212
children: [
1313
{ node_name: 'Zlib', edge_name: 'native_to_javascript' },
1414
// No entry for memory because zlib memory is initialized lazily.
15-
]
15+
],
1616
},
1717
]);
1818

@@ -22,7 +22,7 @@ gzip.write('hello world', common.mustCall(() => {
2222
children: [
2323
{ node_name: 'Zlib', edge_name: 'native_to_javascript' },
2424
{ node_name: 'Node / zlib_memory', edge_name: 'zlib_memory' },
25-
]
25+
],
2626
},
2727
]);
2828
}));

test/pummel/test-heapsnapshot-near-heap-limit-big.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const fixtures = require('../common/fixtures');
88
const fs = require('fs');
99
const env = {
1010
...process.env,
11-
NODE_DEBUG_NATIVE: 'diagnostics'
11+
NODE_DEBUG_NATIVE: 'diagnostics',
1212
};
1313

1414
if (!common.enoughTestMem)
@@ -26,7 +26,7 @@ if (!common.enoughTestMem)
2626
env: {
2727
...env,
2828
TEST_CHUNK: 2000,
29-
}
29+
},
3030
});
3131
const stderr = child.stderr.toString();
3232
console.log(stderr);

test/pummel/test-heapsnapshot-near-heap-limit-bounded.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const env = {
1616
TEST_ALLOCATION: 50000,
1717
TEST_CHUNK: 1000,
1818
TEST_CLEAN_INTERVAL: 500,
19-
NODE_DEBUG_NATIVE: 'diagnostics'
19+
NODE_DEBUG_NATIVE: 'diagnostics',
2020
};
2121

2222
{

test/pummel/test-heapsnapshot-near-heap-limit-by-api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const env = {
9898
env: {
9999
...env,
100100
limit: 1,
101-
limit2: 2
101+
limit2: 2,
102102
},
103103
});
104104
console.log(child.stdout.toString());

test/pummel/test-heapsnapshot-near-heap-limit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const fixtures = require('../common/fixtures');
1313
const fs = require('fs');
1414
const env = {
1515
...process.env,
16-
NODE_DEBUG_NATIVE: 'diagnostics'
16+
NODE_DEBUG_NATIVE: 'diagnostics',
1717
};
1818

1919
{

test/pummel/test-http-many-keep-alive-connections.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ server.listen(0, function connect() {
4545
port: server.address().port,
4646
path: '/',
4747
headers: {
48-
'Connection': 'Keep-alive'
49-
}
48+
'Connection': 'Keep-alive',
49+
},
5050
}, function(res) {
5151
res.on('end', function() {
5252
if (++responses < expected) {

test/pummel/test-http-upload-timeout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ server.listen(0, function() {
5353
const request = http.request({
5454
port: server.address().port,
5555
method: 'POST',
56-
path: '/'
56+
path: '/',
5757
});
5858

5959
function ping() {

test/pummel/test-https-large-response.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const https = require('https');
3030

3131
const options = {
3232
key: fixtures.readKey('agent1-key.pem'),
33-
cert: fixtures.readKey('agent1-cert.pem')
33+
cert: fixtures.readKey('agent1-cert.pem'),
3434
};
3535

3636
process.stdout.write('build body...');
@@ -46,7 +46,7 @@ const server = https.createServer(options, common.mustCall(function(req, res) {
4646
server.listen(0, common.mustCall(function() {
4747
https.get({
4848
port: server.address().port,
49-
rejectUnauthorized: false
49+
rejectUnauthorized: false,
5050
}, common.mustCall(function(res) {
5151
console.log('response!');
5252

test/pummel/test-https-no-reader.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const fixtures = require('../common/fixtures');
3030

3131
const options = {
3232
key: fixtures.readKey('rsa_private.pem'),
33-
cert: fixtures.readKey('rsa_cert.crt')
33+
cert: fixtures.readKey('rsa_cert.crt'),
3434
};
3535

3636
const buf = Buffer.allocUnsafe(1024 * 1024);
@@ -47,7 +47,7 @@ server.listen(0, function() {
4747
const req = https.request({
4848
method: 'POST',
4949
port: server.address().port,
50-
rejectUnauthorized: false
50+
rejectUnauthorized: false,
5151
}, function(res) {
5252
res.read(0);
5353

test/pummel/test-keep-alive.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const body = 'hello world\n';
3737
const server = http.createServer((req, res) => {
3838
res.writeHead(200, {
3939
'Content-Length': body.length,
40-
'Content-Type': 'text/plain'
40+
'Content-Type': 'text/plain',
4141
});
4242
res.write(body);
4343
res.end();
@@ -108,17 +108,17 @@ process.on('exit', () => {
108108
assert.strictEqual(
109109
normalReqSec > 50,
110110
true,
111-
`normalReqSec should be greater than 50, but got ${normalReqSec}`
111+
`normalReqSec should be greater than 50, but got ${normalReqSec}`,
112112
);
113113
assert.strictEqual(
114114
keepAliveReqSec > 50,
115115
true,
116-
`keepAliveReqSec should be greater than 50, but got ${keepAliveReqSec}`
116+
`keepAliveReqSec should be greater than 50, but got ${keepAliveReqSec}`,
117117
);
118118
assert.strictEqual(
119119
normalReqSec < keepAliveReqSec,
120120
true,
121121
'normalReqSec should be less than keepAliveReqSec, ' +
122-
`but ${normalReqSec} is greater than ${keepAliveReqSec}`
122+
`but ${normalReqSec} is greater than ${keepAliveReqSec}`,
123123
);
124124
});

test/pummel/test-net-throttle.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const server = net.createServer((connection) => {
4646
assert.ok(connection.bufferSize >= 0, `bufferSize: ${connection.bufferSize}`);
4747
assert.ok(
4848
connection.writableLength <= totalLength,
49-
`writableLength: ${connection.writableLength}, totalLength: ${totalLength}`
49+
`writableLength: ${connection.writableLength}, totalLength: ${totalLength}`,
5050
);
5151
connection.end();
5252
});

0 commit comments

Comments
 (0)