test: prepare for consistent comma-dangle lint rule · nodejs/node@330f25e · GitHub
Skip to content

Commit 330f25e

Browse files
committed
test: prepare for consistent comma-dangle lint rule
Make changes so that tests will pass when the comma-dangle settings applied to the rest of the code base are also applied to tests. PR-URL: #37930 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
1 parent f0bf373 commit 330f25e

407 files changed

Lines changed: 962 additions & 962 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/abort/test-worker-abort-uncaught-exception.js

Lines changed: 1 addition & 1 deletion

test/addons/register-signal-handler/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ for (const raiseSignal of [ 'SIGABRT', 'SIGSEGV' ]) {
3434
{ reset: true, count: 1, stderr: [signo], code: 0, signal: null },
3535
{ reset: true, count: 2, stderr: [signo], code: null, signal: raiseSignal },
3636
{ reset: false, count: 1, stderr: [signo], code: 0, signal: null },
37-
{ reset: false, count: 2, stderr: [signo, signo], code: 0, signal: null }
37+
{ reset: false, count: 2, stderr: [signo, signo], code: 0, signal: null },
3838
]) {
3939
// We do not want to generate core files when running this test as an
4040
// addon test. We require this file as an abort test as well, though,

test/addons/worker-addon/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ for (const { test, expected } of [
4848
// musl doesn't support unloading, so the output may be missing
4949
// a dtor + ctor pair.
5050
expected: [
51-
'ctor cleanup dtor ctor cleanup dtor '
51+
'ctor cleanup dtor ctor cleanup dtor ',
5252
].concat(libcMayBeMusl ? [
5353
'ctor cleanup cleanup dtor ',
5454
] : [])
@@ -57,7 +57,7 @@ for (const { test, expected } of [
5757
console.log('spawning test', test);
5858
const proc = child_process.spawnSync(process.execPath, [
5959
__filename,
60-
test
60+
test,
6161
]);
6262
process.stderr.write(proc.stderr.toString());
6363
assert.strictEqual(proc.stderr.toString(), '');

test/async-hooks/test-graph.tls-write.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function onexit() {
6565
{ type: 'TCPCONNECTWRAP',
6666
id: 'tcpconnect:1', triggerAsyncId: 'tcp:1' },
6767
{ type: 'TCPWRAP', id: 'tcp:2', triggerAsyncId: 'tcpserver:1' },
68-
{ type: 'TLSWRAP', id: 'tls:2', triggerAsyncId: 'tcpserver:1' }
68+
{ type: 'TLSWRAP', id: 'tls:2', triggerAsyncId: 'tcpserver:1' },
6969
]
7070
);
7171
}

test/common/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ expectWarning('Warning', 'Foobar is really bad');
115115
expectWarning('DeprecationWarning', 'Foobar is deprecated', 'DEP0XXX');
116116

117117
expectWarning('DeprecationWarning', [
118-
'Foobar is deprecated', 'DEP0XXX'
118+
'Foobar is deprecated', 'DEP0XXX',
119119
]);
120120

121121
expectWarning('DeprecationWarning', [
122122
['Foobar is deprecated', 'DEP0XXX'],
123-
['Baz is also deprecated', 'DEP0XX2']
123+
['Baz is also deprecated', 'DEP0XX2'],
124124
]);
125125

126126
expectWarning('DeprecationWarning', {
@@ -135,7 +135,7 @@ expectWarning({
135135
},
136136
Warning: [
137137
['Multiple array entries are fine', 'SpecialWarningCode'],
138-
['No code is also fine']
138+
['No code is also fine'],
139139
],
140140
SingleEntry: ['This will also work', 'WarningCode'],
141141
SingleString: 'Single string entries without code will also work'
@@ -665,9 +665,9 @@ validateSnapshotNodes('TLSWRAP', [
665665
children: [
666666
{ name: 'enc_out' },
667667
{ name: 'enc_in' },
668-
{ name: 'TLSWrap' }
668+
{ name: 'TLSWrap' },
669669
]
670-
}
670+
},
671671
]);
672672
```
673673

test/common/dns.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function parseDNSPacket(buffer) {
6060
['questions', buffer.readUInt16BE(4)],
6161
['answers', buffer.readUInt16BE(6)],
6262
['authorityAnswers', buffer.readUInt16BE(8)],
63-
['additionalRecords', buffer.readUInt16BE(10)]
63+
['additionalRecords', buffer.readUInt16BE(10)],
6464
];
6565

6666
let offset = 12;
@@ -185,7 +185,7 @@ function writeDomainName(domain) {
185185
assert(label.length < 64);
186186
return Buffer.concat([
187187
Buffer.from([label.length]),
188-
Buffer.from(label, 'ascii')
188+
Buffer.from(label, 'ascii'),
189189
]);
190190
}).concat([Buffer.alloc(1)]));
191191
}
@@ -208,7 +208,7 @@ function writeDNSPacket(parsed) {
208208
buffers.push(writeDomainName(q.domain));
209209
buffers.push(new Uint16Array([
210210
types[q.type],
211-
q.cls === undefined ? classes.IN : q.cls
211+
q.cls === undefined ? classes.IN : q.cls,
212212
]));
213213
}
214214

@@ -221,7 +221,7 @@ function writeDNSPacket(parsed) {
221221
buffers.push(writeDomainName(rr.domain));
222222
buffers.push(new Uint16Array([
223223
types[rr.type],
224-
rr.cls === undefined ? classes.IN : rr.cls
224+
rr.cls === undefined ? classes.IN : rr.cls,
225225
]));
226226
buffers.push(new Int32Array([rr.ttl]));
227227

@@ -266,7 +266,7 @@ function writeDNSPacket(parsed) {
266266
rdLengthBuf[0] = mname.length + rname.length + 20;
267267
buffers.push(mname, rname);
268268
buffers.push(new Uint32Array([
269-
rr.serial, rr.refresh, rr.retry, rr.expire, rr.minttl
269+
rr.serial, rr.refresh, rr.retry, rr.expire, rr.minttl,
270270
]));
271271
break;
272272
}

test/common/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ function getArrayBufferViews(buf) {
612612
Uint32Array,
613613
Float32Array,
614614
Float64Array,
615-
DataView
615+
DataView,
616616
];
617617

618618
for (const type of arrayBufferViews) {

test/common/inspector-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ function fires(promise, error, timeoutMs) {
515515
const timeout = timeoutPromise(error, timeoutMs);
516516
return Promise.race([
517517
onResolvedOrRejected(promise, () => timeout.clear()),
518-
timeout
518+
timeout,
519519
]);
520520
}
521521

test/common/tls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class TestTLSSocket extends net.Socket {
4444
createClientHello() {
4545
const compressions = Buffer.from('0100', 'hex'); // null
4646
const msg = addHandshakeHeader(0x01, Buffer.concat([
47-
this.version, this.client_random, this.ciphers, compressions
47+
this.version, this.client_random, this.ciphers, compressions,
4848
]));
4949
this.emit('handshake', msg);
5050
return addRecordHeader(0x16, msg);

test/doctool/test-doctool-json.js

Lines changed: 14 additions & 14 deletions

0 commit comments

Comments
 (0)