Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 232bdd5

Browse filesBrowse files
aduh95ruyadorno
authored andcommitted
test: add trailing commas in test/node-api
PR-URL: #46384 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 4cc0818 commit 232bdd5
Copy full SHA for 232bdd5

File tree

Expand file treeCollapse file tree

10 files changed

+26
-27
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

10 files changed

+26
-27
lines changed
Open diff view settings
Collapse file

‎test/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: test/.eslintrc.yaml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ overrides:
7979
- internet/*.js
8080
- js-native-api/*/*.js
8181
- known_issues/*.js
82-
- node-api/*/*.js
8382
- parallel/*.js
8483
- parallel/*.mjs
8584
- pummel/*.js
Collapse file

‎test/node-api/test_async/test-async-hooks.js‎

Copy file name to clipboardExpand all lines: test/node-api/test_async/test-async-hooks.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async_hooks.createHook({
2929
if (testId === id) {
3030
events.push({ type: 'destroy', id });
3131
}
32-
}
32+
},
3333
}).enable();
3434

3535
const resource = { foo: 'foo' };
Collapse file

‎test/node-api/test_async_context/test-gcable-callback.js‎

Copy file name to clipboardExpand all lines: test/node-api/test_async_context/test-gcable-callback.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const test_hook = async_hooks.createHook({
3434
test_hook.enable();
3535
const asyncResource = createAsyncResource(
3636
{ foo: 'bar' },
37-
/* destroy_on_finalizer */false
37+
/* destroy_on_finalizer */false,
3838
);
3939

4040
// Trigger GC. This does *not* use global.gc(), because what we want to verify
Collapse file

‎test/node-api/test_async_context/test.js‎

Copy file name to clipboardExpand all lines: test/node-api/test_async_context/test.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const resourceWrap = createAsyncResource(
3535
/**
3636
* set resource to NULL to generate a managed resource object
3737
*/
38-
undefined
38+
undefined,
3939
);
4040

4141
assert.strictEqual(hook_result.destroy_called, false);
@@ -44,15 +44,15 @@ makeCallback(resourceWrap, recv, function callback() {
4444
assert.strictEqual(hook_result.destroy_called, false);
4545
assert.strictEqual(
4646
hook_result.resource,
47-
async_hooks.executionAsyncResource()
47+
async_hooks.executionAsyncResource(),
4848
);
4949
assert.strictEqual(this, recv);
5050

5151
setImmediate(() => {
5252
assert.strictEqual(hook_result.destroy_called, false);
5353
assert.notStrictEqual(
5454
hook_result.resource,
55-
async_hooks.executionAsyncResource()
55+
async_hooks.executionAsyncResource(),
5656
);
5757

5858
destroyAsyncResource(resourceWrap);
Collapse file

‎test/node-api/test_callback_scope/test-async-hooks.js‎

Copy file name to clipboardExpand all lines: test/node-api/test_callback_scope/test-async-hooks.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async_hooks.createHook({
3131
after: common.mustCall((id) => {
3232
assert.strictEqual(id, expectedId);
3333
insideHook = false;
34-
})
34+
}),
3535
}).enable();
3636

3737
runInCallbackScope(expectedResource, expectedResourceType, () => {
Collapse file

‎test/node-api/test_general/test.js‎

Copy file name to clipboardExpand all lines: test/node-api/test_general/test.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tmpdir.refresh();
3434
fs.rmSync(urlTestDir, {
3535
force: true,
3636
recursive: true,
37-
maxRetries: 256
37+
maxRetries: 256,
3838
});
3939
}
4040

Collapse file

‎test/node-api/test_policy/test_policy.js‎

Copy file name to clipboardExpand all lines: test/node-api/test_policy/test_policy.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ function test(shouldFail, resources) {
5757

5858
test(false, [{
5959
url: depURL,
60-
integrity: `sha256-${hash('sha256', depBody)}`
60+
integrity: `sha256-${hash('sha256', depBody)}`,
6161
}]);
6262
test(true, [{
6363
url: depURL,
64-
integrity: `sha256akjsalkjdlaskjdk-${hash('sha256', depBody)}`
64+
integrity: `sha256akjsalkjdlaskjdk-${hash('sha256', depBody)}`,
6565
}]);
Collapse file

‎test/node-api/test_threadsafe_function/test.js‎

Copy file name to clipboardExpand all lines: test/node-api/test_threadsafe_function/test.js
+14-14Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function testUnref(queueSize) {
6363
return new Promise((resolve, reject) => {
6464
let output = '';
6565
const child = fork(__filename, ['child', queueSize], {
66-
stdio: [process.stdin, 'pipe', process.stderr, 'ipc']
66+
stdio: [process.stdin, 'pipe', process.stderr, 'ipc'],
6767
});
6868
child.on('close', (code) => {
6969
if (code === 0) {
@@ -99,7 +99,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
9999
.then(() => testWithJSMarshaller({
100100
threadStarter: 'StartThread',
101101
maxQueueSize: binding.MAX_QUEUE_SIZE,
102-
quitAfter: binding.ARRAY_LENGTH
102+
quitAfter: binding.ARRAY_LENGTH,
103103
}))
104104
.then((result) => assert.deepStrictEqual(result, expectedArray))
105105

@@ -110,7 +110,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
110110
.then(() => testWithJSMarshaller({
111111
threadStarter: 'StartThreadNoJsFunc',
112112
maxQueueSize: binding.MAX_QUEUE_SIZE,
113-
quitAfter: binding.ARRAY_LENGTH
113+
quitAfter: binding.ARRAY_LENGTH,
114114
}))
115115
.then((result) => assert.deepStrictEqual(result, expectedArray))
116116

@@ -119,7 +119,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
119119
.then(() => testWithJSMarshaller({
120120
threadStarter: 'StartThread',
121121
maxQueueSize: 0,
122-
quitAfter: binding.ARRAY_LENGTH
122+
quitAfter: binding.ARRAY_LENGTH,
123123
}))
124124
.then((result) => assert.deepStrictEqual(result, expectedArray))
125125

@@ -128,7 +128,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
128128
.then(() => testWithJSMarshaller({
129129
threadStarter: 'StartThreadNonblocking',
130130
maxQueueSize: binding.MAX_QUEUE_SIZE,
131-
quitAfter: binding.ARRAY_LENGTH
131+
quitAfter: binding.ARRAY_LENGTH,
132132
}))
133133
.then((result) => assert.deepStrictEqual(result, expectedArray))
134134

@@ -137,7 +137,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
137137
.then(() => testWithJSMarshaller({
138138
threadStarter: 'StartThread',
139139
maxQueueSize: binding.MAX_QUEUE_SIZE,
140-
quitAfter: 1
140+
quitAfter: 1,
141141
}))
142142
.then((result) => assert.deepStrictEqual(result, expectedArray))
143143

@@ -146,7 +146,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
146146
.then(() => testWithJSMarshaller({
147147
threadStarter: 'StartThread',
148148
maxQueueSize: 0,
149-
quitAfter: 1
149+
quitAfter: 1,
150150
}))
151151
.then((result) => assert.deepStrictEqual(result, expectedArray))
152152

@@ -155,7 +155,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
155155
.then(() => testWithJSMarshaller({
156156
threadStarter: 'StartThreadNonblocking',
157157
maxQueueSize: binding.MAX_QUEUE_SIZE,
158-
quitAfter: 1
158+
quitAfter: 1,
159159
}))
160160
.then((result) => assert.deepStrictEqual(result, expectedArray))
161161

@@ -166,7 +166,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
166166
threadStarter: 'StartThread',
167167
quitAfter: 1,
168168
maxQueueSize: binding.MAX_QUEUE_SIZE,
169-
launchSecondary: true
169+
launchSecondary: true,
170170
}))
171171
.then((result) => assert.deepStrictEqual(result, expectedArray))
172172

@@ -177,7 +177,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
177177
threadStarter: 'StartThreadNonblocking',
178178
quitAfter: 1,
179179
maxQueueSize: binding.MAX_QUEUE_SIZE,
180-
launchSecondary: true
180+
launchSecondary: true,
181181
}))
182182
.then((result) => assert.deepStrictEqual(result, expectedArray))
183183

@@ -187,7 +187,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
187187
threadStarter: 'StartThread',
188188
quitAfter: 1,
189189
maxQueueSize: binding.MAX_QUEUE_SIZE,
190-
abort: true
190+
abort: true,
191191
}))
192192
.then((result) => assert.strictEqual(result.indexOf(0), -1))
193193

@@ -197,7 +197,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
197197
threadStarter: 'StartThread',
198198
quitAfter: 1,
199199
maxQueueSize: 0,
200-
abort: true
200+
abort: true,
201201
}))
202202
.then((result) => assert.strictEqual(result.indexOf(0), -1))
203203

@@ -207,7 +207,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
207207
threadStarter: 'StartThreadNonblocking',
208208
quitAfter: 1,
209209
maxQueueSize: binding.MAX_QUEUE_SIZE,
210-
abort: true
210+
abort: true,
211211
}))
212212
.then((result) => assert.strictEqual(result.indexOf(0), -1))
213213

@@ -216,7 +216,7 @@ new Promise(function testWithoutJSMarshaller(resolve) {
216216
.then(() => testWithJSMarshaller({
217217
threadStarter: 'StartThreadNonblocking',
218218
maxQueueSize: binding.ARRAY_LENGTH >>> 1,
219-
quitAfter: binding.ARRAY_LENGTH
219+
quitAfter: binding.ARRAY_LENGTH,
220220
}))
221221
.then((result) => assert.deepStrictEqual(result, expectedArray))
222222

Collapse file

‎test/node-api/test_threadsafe_function/test_force_uncaught_exception.js‎

Copy file name to clipboardExpand all lines: test/node-api/test_threadsafe_function/test_force_uncaught_exception.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const binding = require(`./build/${common.buildType}/binding`);
77
process.on(
88
'uncaughtException',
99
common.mustNotCall('uncaught callback errors should be suppressed ' +
10-
'with the option --no-force-node-api-uncaught-exceptions-policy')
10+
'with the option --no-force-node-api-uncaught-exceptions-policy'),
1111
);
1212

1313
binding.CallIntoModule(
@@ -18,5 +18,5 @@ binding.CallIntoModule(
1818
'resource_name',
1919
common.mustCall(function finalizer() {
2020
throw new Error('finalizer error');
21-
})
21+
}),
2222
);
Collapse file

‎test/node-api/test_threadsafe_function/test_uncaught_exception.js‎

Copy file name to clipboardExpand all lines: test/node-api/test_threadsafe_function/test_uncaught_exception.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ binding.CallIntoModule(
2323
'resource_name',
2424
common.mustCall(function finalizer() {
2525
throw new Error('finalizer error');
26-
})
26+
}),
2727
);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.