Skip to content

Commit 217f2f6

Browse files
aduh95MylesBorins
authored andcommittedFeb 20, 2023
test: add trailing commas in test/pummel
PR-URL: #46610 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
1 parent 803f00a commit 217f2f6

36 files changed

+175
-176
lines changed
 

‎test/.eslintrc.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ overrides:
7878
- es-module/*.mjs
7979
- parallel/*.js
8080
- parallel/*.mjs
81-
- pummel/*.js
8281
- sequential/*.js
8382
- sequential/*.mjs
8483
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
});

‎test/pummel/test-policy-integrity-dep.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ function drainQueue() {
9393
const testId = newTestId();
9494
const configDirPath = path.join(
9595
tmpdir.path,
96-
`test-policy-integrity-permutation-${testId}`
96+
`test-policy-integrity-permutation-${testId}`,
9797
);
9898
const tmpPolicyPath = path.join(
9999
tmpdir.path,
100-
`deletable-policy-${testId}.json`
100+
`deletable-policy-${testId}.json`,
101101
);
102102

103103
fs.rmSync(configDirPath, { maxRetries: 3, recursive: true, force: true });
@@ -108,7 +108,7 @@ function drainQueue() {
108108
};
109109
const manifestPath = path.join(configDirPath, policyPath);
110110
for (const [resourcePath, { body, integrities }] of Object.entries(
111-
resources
111+
resources,
112112
)) {
113113
const filePath = path.join(configDirPath, resourcePath);
114114
if (integrities !== null) {
@@ -165,11 +165,11 @@ function drainQueue() {
165165
console.log(
166166
'permutation',
167167
testId,
168-
'failed'
168+
'failed',
169169
);
170170
console.dir(
171171
{ config, manifest },
172-
{ depth: null }
172+
{ depth: null },
173173
);
174174
console.log('exit code:', status, 'signal:', signal);
175175
console.log(`stdout: ${Buffer.concat(stdout)}`);
@@ -189,7 +189,7 @@ function drainQueue() {
189189
['--experimental-policy', policyPath, '--experimental-policy', policyPath],
190190
{
191191
stdio: 'pipe',
192-
}
192+
},
193193
);
194194
assert.notStrictEqual(status, 0, 'Should not allow multiple policies');
195195
}
@@ -205,7 +205,7 @@ function drainQueue() {
205205
['--experimental-policy', enoentFilepath, '-e', ''],
206206
{
207207
stdio: 'pipe',
208-
}
208+
},
209209
);
210210
assert.notStrictEqual(status, 0, 'Should not allow missing policies');
211211
}
@@ -254,11 +254,11 @@ for (const permutation of permutations({
254254
permutation.packageType === 'module' ? 'module' : 'commonjs';
255255
const parentFormat = fileExtensionFormat(
256256
permutation.parentExtension,
257-
effectivePackageType
257+
effectivePackageType,
258258
);
259259
const depFormat = fileExtensionFormat(
260260
permutation.depExtension,
261-
effectivePackageType
261+
effectivePackageType,
262262
);
263263
// non-sensical attempt to require ESM
264264
if (depFormat === 'module' && parentFormat === 'commonjs') {
@@ -354,7 +354,7 @@ for (const permutation of permutations({
354354
parentPath,
355355
depPath,
356356
resources,
357-
})
357+
}),
358358
);
359359
}
360360
debug(`spawning ${tests.size} policy integrity permutations`);

‎test/pummel/test-policy-integrity-parent-commonjs.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ function drainQueue() {
9494
const testId = newTestId();
9595
const configDirPath = path.join(
9696
tmpdir.path,
97-
`test-policy-integrity-permutation-${testId}`
97+
`test-policy-integrity-permutation-${testId}`,
9898
);
9999
const tmpPolicyPath = path.join(
100100
tmpdir.path,
101-
`deletable-policy-${testId}.json`
101+
`deletable-policy-${testId}.json`,
102102
);
103103
const cliPolicy = willDeletePolicy ? tmpPolicyPath : policyPath;
104104
fs.rmSync(configDirPath, { maxRetries: 3, recursive: true, force: true });
@@ -109,7 +109,7 @@ function drainQueue() {
109109
};
110110
const manifestPath = path.join(configDirPath, policyPath);
111111
for (const [resourcePath, { body, integrities }] of Object.entries(
112-
resources
112+
resources,
113113
)) {
114114
const filePath = path.join(configDirPath, resourcePath);
115115
if (integrities !== null) {
@@ -166,11 +166,11 @@ function drainQueue() {
166166
console.log(
167167
'permutation',
168168
testId,
169-
'failed'
169+
'failed',
170170
);
171171
console.dir(
172172
{ config, manifest },
173-
{ depth: null }
173+
{ depth: null },
174174
);
175175
console.log('exit code:', status, 'signal:', signal);
176176
console.log(`stdout: ${Buffer.concat(stdout)}`);
@@ -189,7 +189,7 @@ function drainQueue() {
189189
['--experimental-policy', policyPath, '--experimental-policy', policyPath],
190190
{
191191
stdio: 'pipe',
192-
}
192+
},
193193
);
194194
assert.notStrictEqual(status, 0, 'Should not allow multiple policies');
195195
}
@@ -205,7 +205,7 @@ function drainQueue() {
205205
['--experimental-policy', enoentFilepath, '-e', ''],
206206
{
207207
stdio: 'pipe',
208-
}
208+
},
209209
);
210210
assert.notStrictEqual(status, 0, 'Should not allow missing policies');
211211
}
@@ -341,7 +341,7 @@ for (const permutation of permutations({
341341
parentPath,
342342
depPath,
343343
resources,
344-
})
344+
}),
345345
);
346346
}
347347
debug(`spawning ${tests.size} policy integrity permutations`);

‎test/pummel/test-policy-integrity-parent-module.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ function drainQueue() {
9494
const testId = newTestId();
9595
const configDirPath = path.join(
9696
tmpdir.path,
97-
`test-policy-integrity-permutation-${testId}`
97+
`test-policy-integrity-permutation-${testId}`,
9898
);
9999
const tmpPolicyPath = path.join(
100100
tmpdir.path,
101-
`deletable-policy-${testId}.json`
101+
`deletable-policy-${testId}.json`,
102102
);
103103
const cliPolicy = willDeletePolicy ? tmpPolicyPath : policyPath;
104104
fs.rmSync(configDirPath, { maxRetries: 3, recursive: true, force: true });
@@ -109,7 +109,7 @@ function drainQueue() {
109109
};
110110
const manifestPath = path.join(configDirPath, policyPath);
111111
for (const [resourcePath, { body, integrities }] of Object.entries(
112-
resources
112+
resources,
113113
)) {
114114
const filePath = path.join(configDirPath, resourcePath);
115115
if (integrities !== null) {
@@ -166,11 +166,11 @@ function drainQueue() {
166166
console.log(
167167
'permutation',
168168
testId,
169-
'failed'
169+
'failed',
170170
);
171171
console.dir(
172172
{ config, manifest },
173-
{ depth: null }
173+
{ depth: null },
174174
);
175175
console.log('exit code:', status, 'signal:', signal);
176176
console.log(`stdout: ${Buffer.concat(stdout)}`);
@@ -189,7 +189,7 @@ function drainQueue() {
189189
['--experimental-policy', policyPath, '--experimental-policy', policyPath],
190190
{
191191
stdio: 'pipe',
192-
}
192+
},
193193
);
194194
assert.notStrictEqual(status, 0, 'Should not allow multiple policies');
195195
}
@@ -205,7 +205,7 @@ function drainQueue() {
205205
['--experimental-policy', enoentFilepath, '-e', ''],
206206
{
207207
stdio: 'pipe',
208-
}
208+
},
209209
);
210210
assert.notStrictEqual(status, 0, 'Should not allow missing policies');
211211
}
@@ -341,7 +341,7 @@ for (const permutation of permutations({
341341
parentPath,
342342
depPath,
343343
resources,
344-
})
344+
}),
345345
);
346346
}
347347
debug(`spawning ${tests.size} policy integrity permutations`);

‎test/pummel/test-policy-integrity-parent-no-package-json.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ function drainQueue() {
9494
const testId = newTestId();
9595
const configDirPath = path.join(
9696
tmpdir.path,
97-
`test-policy-integrity-permutation-${testId}`
97+
`test-policy-integrity-permutation-${testId}`,
9898
);
9999
const tmpPolicyPath = path.join(
100100
tmpdir.path,
101-
`deletable-policy-${testId}.json`
101+
`deletable-policy-${testId}.json`,
102102
);
103103
const cliPolicy = willDeletePolicy ? tmpPolicyPath : policyPath;
104104
fs.rmSync(configDirPath, { maxRetries: 3, recursive: true, force: true });
@@ -109,7 +109,7 @@ function drainQueue() {
109109
};
110110
const manifestPath = path.join(configDirPath, policyPath);
111111
for (const [resourcePath, { body, integrities }] of Object.entries(
112-
resources
112+
resources,
113113
)) {
114114
const filePath = path.join(configDirPath, resourcePath);
115115
if (integrities !== null) {
@@ -166,11 +166,11 @@ function drainQueue() {
166166
console.log(
167167
'permutation',
168168
testId,
169-
'failed'
169+
'failed',
170170
);
171171
console.dir(
172172
{ config, manifest },
173-
{ depth: null }
173+
{ depth: null },
174174
);
175175
console.log('exit code:', status, 'signal:', signal);
176176
console.log(`stdout: ${Buffer.concat(stdout)}`);
@@ -189,7 +189,7 @@ function drainQueue() {
189189
['--experimental-policy', policyPath, '--experimental-policy', policyPath],
190190
{
191191
stdio: 'pipe',
192-
}
192+
},
193193
);
194194
assert.notStrictEqual(status, 0, 'Should not allow multiple policies');
195195
}
@@ -205,7 +205,7 @@ function drainQueue() {
205205
['--experimental-policy', enoentFilepath, '-e', ''],
206206
{
207207
stdio: 'pipe',
208-
}
208+
},
209209
);
210210
assert.notStrictEqual(status, 0, 'Should not allow missing policies');
211211
}
@@ -313,7 +313,7 @@ for (const permutation of permutations({
313313
parentPath,
314314
depPath,
315315
resources,
316-
})
316+
}),
317317
);
318318
}
319319
debug(`spawning ${tests.size} policy integrity permutations`);

‎test/pummel/test-policy-integrity-worker-commonjs.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ function drainQueue() {
111111
const testId = newTestId();
112112
const configDirPath = path.join(
113113
tmpdir.path,
114-
`test-policy-integrity-permutation-${testId}`
114+
`test-policy-integrity-permutation-${testId}`,
115115
);
116116
const tmpPolicyPath = path.join(
117117
tmpdir.path,
118-
`deletable-policy-${testId}.json`
118+
`deletable-policy-${testId}.json`,
119119
);
120120

121121
fs.rmSync(configDirPath, { maxRetries: 3, recursive: true, force: true });
@@ -126,7 +126,7 @@ function drainQueue() {
126126
};
127127
const manifestPath = path.join(configDirPath, policyPath);
128128
for (const [resourcePath, { body, integrities }] of Object.entries(
129-
resources
129+
resources,
130130
)) {
131131
const filePath = path.join(configDirPath, resourcePath);
132132
if (integrities !== null) {
@@ -183,11 +183,11 @@ function drainQueue() {
183183
console.log(
184184
'permutation',
185185
testId,
186-
'failed'
186+
'failed',
187187
);
188188
console.dir(
189189
{ config, manifest },
190-
{ depth: null }
190+
{ depth: null },
191191
);
192192
console.log('exit code:', status, 'signal:', signal);
193193
console.log(`stdout: ${Buffer.concat(stdout)}`);
@@ -206,7 +206,7 @@ function drainQueue() {
206206
['--experimental-policy', policyPath, '--experimental-policy', policyPath],
207207
{
208208
stdio: 'pipe',
209-
}
209+
},
210210
);
211211
assert.notStrictEqual(status, 0, 'Should not allow multiple policies');
212212
}
@@ -222,7 +222,7 @@ function drainQueue() {
222222
['--experimental-policy', enoentFilepath, '-e', ''],
223223
{
224224
stdio: 'pipe',
225-
}
225+
},
226226
);
227227
assert.notStrictEqual(status, 0, 'Should not allow missing policies');
228228
}
@@ -364,7 +364,7 @@ for (const permutation of permutations({
364364
parentPath,
365365
depPath,
366366
resources,
367-
})
367+
}),
368368
);
369369
}
370370
debug(`spawning ${tests.size} policy integrity permutations`);

‎test/pummel/test-policy-integrity-worker-module.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ function drainQueue() {
111111
const testId = newTestId();
112112
const configDirPath = path.join(
113113
tmpdir.path,
114-
`test-policy-integrity-permutation-${testId}`
114+
`test-policy-integrity-permutation-${testId}`,
115115
);
116116
const tmpPolicyPath = path.join(
117117
tmpdir.path,
118-
`deletable-policy-${testId}.json`
118+
`deletable-policy-${testId}.json`,
119119
);
120120

121121
fs.rmSync(configDirPath, { maxRetries: 3, recursive: true, force: true });
@@ -126,7 +126,7 @@ function drainQueue() {
126126
};
127127
const manifestPath = path.join(configDirPath, policyPath);
128128
for (const [resourcePath, { body, integrities }] of Object.entries(
129-
resources
129+
resources,
130130
)) {
131131
const filePath = path.join(configDirPath, resourcePath);
132132
if (integrities !== null) {
@@ -183,11 +183,11 @@ function drainQueue() {
183183
console.log(
184184
'permutation',
185185
testId,
186-
'failed'
186+
'failed',
187187
);
188188
console.dir(
189189
{ config, manifest },
190-
{ depth: null }
190+
{ depth: null },
191191
);
192192
console.log('exit code:', status, 'signal:', signal);
193193
console.log(`stdout: ${Buffer.concat(stdout)}`);
@@ -206,7 +206,7 @@ function drainQueue() {
206206
['--experimental-policy', policyPath, '--experimental-policy', policyPath],
207207
{
208208
stdio: 'pipe',
209-
}
209+
},
210210
);
211211
assert.notStrictEqual(status, 0, 'Should not allow multiple policies');
212212
}
@@ -222,7 +222,7 @@ function drainQueue() {
222222
['--experimental-policy', enoentFilepath, '-e', ''],
223223
{
224224
stdio: 'pipe',
225-
}
225+
},
226226
);
227227
assert.notStrictEqual(status, 0, 'Should not allow missing policies');
228228
}
@@ -362,7 +362,7 @@ for (const permutation of permutations({
362362
parentPath,
363363
depPath,
364364
resources,
365-
})
365+
}),
366366
);
367367
}
368368
debug(`spawning ${tests.size} policy integrity permutations`);

‎test/pummel/test-policy-integrity-worker-no-package-json.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ function drainQueue() {
111111
const testId = newTestId();
112112
const configDirPath = path.join(
113113
tmpdir.path,
114-
`test-policy-integrity-permutation-${testId}`
114+
`test-policy-integrity-permutation-${testId}`,
115115
);
116116
const tmpPolicyPath = path.join(
117117
tmpdir.path,
118-
`deletable-policy-${testId}.json`
118+
`deletable-policy-${testId}.json`,
119119
);
120120

121121
fs.rmSync(configDirPath, { maxRetries: 3, recursive: true, force: true });
@@ -126,7 +126,7 @@ function drainQueue() {
126126
};
127127
const manifestPath = path.join(configDirPath, policyPath);
128128
for (const [resourcePath, { body, integrities }] of Object.entries(
129-
resources
129+
resources,
130130
)) {
131131
const filePath = path.join(configDirPath, resourcePath);
132132
if (integrities !== null) {
@@ -183,11 +183,11 @@ function drainQueue() {
183183
console.log(
184184
'permutation',
185185
testId,
186-
'failed'
186+
'failed',
187187
);
188188
console.dir(
189189
{ config, manifest },
190-
{ depth: null }
190+
{ depth: null },
191191
);
192192
console.log('exit code:', status, 'signal:', signal);
193193
console.log(`stdout: ${Buffer.concat(stdout)}`);
@@ -206,7 +206,7 @@ function drainQueue() {
206206
['--experimental-policy', policyPath, '--experimental-policy', policyPath],
207207
{
208208
stdio: 'pipe',
209-
}
209+
},
210210
);
211211
assert.notStrictEqual(status, 0, 'Should not allow multiple policies');
212212
}
@@ -222,7 +222,7 @@ function drainQueue() {
222222
['--experimental-policy', enoentFilepath, '-e', ''],
223223
{
224224
stdio: 'pipe',
225-
}
225+
},
226226
);
227227
assert.notStrictEqual(status, 0, 'Should not allow missing policies');
228228
}
@@ -334,7 +334,7 @@ for (const permutation of permutations({
334334
parentPath,
335335
depPath,
336336
resources,
337-
})
337+
}),
338338
);
339339
}
340340
debug(`spawning ${tests.size} policy integrity permutations`);

‎test/pummel/test-regress-GH-892.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function makeRequest() {
7878

7979
const serverOptions = {
8080
key: fixtures.readKey('agent1-key.pem'),
81-
cert: fixtures.readKey('agent1-cert.pem')
81+
cert: fixtures.readKey('agent1-cert.pem'),
8282
};
8383

8484
let uploadCount = 0;

‎test/pummel/test-tls-server-large-request.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const request = Buffer.from('ABCD'.repeat(1024 * 256 - 1)); // 1mb
3333

3434
const options = {
3535
key: fixtures.readKey('agent1-key.pem'),
36-
cert: fixtures.readKey('agent1-cert.pem')
36+
cert: fixtures.readKey('agent1-cert.pem'),
3737
};
3838

3939
class Mediator extends stream.Writable {
@@ -62,7 +62,7 @@ const server = tls.Server(options, common.mustCall(function(socket) {
6262
server.listen(0, common.mustCall(() => {
6363
const client1 = tls.connect({
6464
port: server.address().port,
65-
rejectUnauthorized: false
65+
rejectUnauthorized: false,
6666
}, common.mustCall(function() {
6767
client1.end(request);
6868
}));

‎test/pummel/test-tls-throttle.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ process.stdout.write('done\n');
3737

3838
const options = {
3939
key: fixtures.readKey('agent2-key.pem'),
40-
cert: fixtures.readKey('agent2-cert.pem')
40+
cert: fixtures.readKey('agent2-cert.pem'),
4141
};
4242

4343
const server = tls.Server(options, common.mustCall(function(socket) {
@@ -49,7 +49,7 @@ let recvCount = 0;
4949
server.listen(0, function() {
5050
const client = tls.connect({
5151
port: server.address().port,
52-
rejectUnauthorized: false
52+
rejectUnauthorized: false,
5353
});
5454

5555
client.on('data', function(d) {

‎test/pummel/test-vm-race.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const vm = require('vm');
99
const sandbox = { timeout: 5 };
1010
const context = vm.createContext(sandbox);
1111
const script = new vm.Script(
12-
'var d = Date.now() + timeout;while (d > Date.now());'
12+
'var d = Date.now() + timeout;while (d > Date.now());',
1313
);
1414
const immediate = setImmediate(function() {
1515
throw new Error('Detected vm race condition!');

‎test/pummel/test-webcrypto-derivebits-pbkdf2.js

+68-68
Large diffs are not rendered by default.

‎test/pummel/test-worker-take-heapsnapshot.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const { once } = require('events');
1515
{
1616
children: [
1717
{ node_name: 'Node / MessagePortData', edge_name: 'data' },
18-
]
18+
],
1919
},
2020
], { loose: true });
2121
await w.terminate();

0 commit comments

Comments
 (0)
Please sign in to comment.