test: add trailing commas in test/node-api

PR-URL: https://github.com/nodejs/node/pull/46384
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Antoine du Hamel authored and ruyadorno@google.com committed 2023-01-31 18:18:10 -05:00
1 parent 4cc081815d
commit 232bdd5d16
10 files changed
+26 -27

No files matched your search

+14 -14
View File
@@ -63,7 +63,7 @@ function testUnref(queueSize) {
return new Promise((resolve, reject) => {
let output = '';
const child = fork(__filename, ['child', queueSize], {
stdio: [process.stdin, 'pipe', process.stderr, 'ipc']
stdio: [process.stdin, 'pipe', process.stderr, 'ipc'],
});
child.on('close', (code) => {
if (code === 0) {
@@ -99,7 +99,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
.then(() => testWithJSMarshaller({
threadStarter: 'StartThread',
maxQueueSize: binding.MAX_QUEUE_SIZE,
quitAfter: binding.ARRAY_LENGTH
quitAfter: binding.ARRAY_LENGTH,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -110,7 +110,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
.then(() => testWithJSMarshaller({
threadStarter: 'StartThreadNoJsFunc',
maxQueueSize: binding.MAX_QUEUE_SIZE,
quitAfter: binding.ARRAY_LENGTH
quitAfter: binding.ARRAY_LENGTH,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -119,7 +119,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
.then(() => testWithJSMarshaller({
threadStarter: 'StartThread',
maxQueueSize: 0,
quitAfter: binding.ARRAY_LENGTH
quitAfter: binding.ARRAY_LENGTH,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -128,7 +128,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
.then(() => testWithJSMarshaller({
threadStarter: 'StartThreadNonblocking',
maxQueueSize: binding.MAX_QUEUE_SIZE,
quitAfter: binding.ARRAY_LENGTH
quitAfter: binding.ARRAY_LENGTH,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -137,7 +137,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
.then(() => testWithJSMarshaller({
threadStarter: 'StartThread',
maxQueueSize: binding.MAX_QUEUE_SIZE,
quitAfter: 1
quitAfter: 1,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -146,7 +146,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
.then(() => testWithJSMarshaller({
threadStarter: 'StartThread',
maxQueueSize: 0,
quitAfter: 1
quitAfter: 1,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -155,7 +155,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
.then(() => testWithJSMarshaller({
threadStarter: 'StartThreadNonblocking',
maxQueueSize: binding.MAX_QUEUE_SIZE,
quitAfter: 1
quitAfter: 1,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -166,7 +166,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
threadStarter: 'StartThread',
quitAfter: 1,
maxQueueSize: binding.MAX_QUEUE_SIZE,
launchSecondary: true
launchSecondary: true,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -177,7 +177,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
threadStarter: 'StartThreadNonblocking',
quitAfter: 1,
maxQueueSize: binding.MAX_QUEUE_SIZE,
launchSecondary: true
launchSecondary: true,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -187,7 +187,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
threadStarter: 'StartThread',
quitAfter: 1,
maxQueueSize: binding.MAX_QUEUE_SIZE,
abort: true
abort: true,
}))
.then((result) => assert.strictEqual(result.indexOf(0), -1))
@@ -197,7 +197,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
threadStarter: 'StartThread',
quitAfter: 1,
maxQueueSize: 0,
abort: true
abort: true,
}))
.then((result) => assert.strictEqual(result.indexOf(0), -1))
@@ -207,7 +207,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
threadStarter: 'StartThreadNonblocking',
quitAfter: 1,
maxQueueSize: binding.MAX_QUEUE_SIZE,
abort: true
abort: true,
}))
.then((result) => assert.strictEqual(result.indexOf(0), -1))
@@ -216,7 +216,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
.then(() => testWithJSMarshaller({
threadStarter: 'StartThreadNonblocking',
maxQueueSize: binding.ARRAY_LENGTH >>> 1,
quitAfter: binding.ARRAY_LENGTH
quitAfter: binding.ARRAY_LENGTH,
}))
.then((result) => assert.deepStrictEqual(result, expectedArray))
@@ -7,7 +7,7 @@ const binding = require(`./build/${common.buildType}/binding`);
process.on(
'uncaughtException',
common.mustNotCall('uncaught callback errors should be suppressed ' +
'with the option --no-force-node-api-uncaught-exceptions-policy')
'with the option --no-force-node-api-uncaught-exceptions-policy'),
);
binding.CallIntoModule(
@@ -18,5 +18,5 @@ binding.CallIntoModule(
'resource_name',
common.mustCall(function finalizer() {
throw new Error('finalizer error');
})
}),
);
@@ -23,5 +23,5 @@ binding.CallIntoModule(
'resource_name',
common.mustCall(function finalizer() {
throw new Error('finalizer error');
})
}),
);