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
2023-01-25 07:05:53 +01:00
parent ac66a99cf1
commit d640feee85
10 changed files with 26 additions and 27 deletions

View File

@@ -34,7 +34,7 @@ const test_hook = async_hooks.createHook({
test_hook.enable();
const asyncResource = createAsyncResource(
{ foo: 'bar' },
/* destroy_on_finalizer */false
/* destroy_on_finalizer */false,
);
// Trigger GC. This does *not* use global.gc(), because what we want to verify

View File

@@ -35,7 +35,7 @@ const resourceWrap = createAsyncResource(
/**
* set resource to NULL to generate a managed resource object
*/
undefined
undefined,
);
assert.strictEqual(hook_result.destroy_called, false);
@@ -44,7 +44,7 @@ makeCallback(resourceWrap, recv, function callback() {
assert.strictEqual(hook_result.destroy_called, false);
assert.strictEqual(
hook_result.resource,
async_hooks.executionAsyncResource()
async_hooks.executionAsyncResource(),
);
assert.strictEqual(this, recv);
@@ -52,7 +52,7 @@ makeCallback(resourceWrap, recv, function callback() {
assert.strictEqual(hook_result.destroy_called, false);
assert.notStrictEqual(
hook_result.resource,
async_hooks.executionAsyncResource()
async_hooks.executionAsyncResource(),
);
destroyAsyncResource(resourceWrap);