Skip to content

Commit f3b3b82

Browse files
committed
lint
1 parent a4aa5fd commit f3b3b82

File tree

8 files changed

+11
-12
lines changed

8 files changed

+11
-12
lines changed

test/common/gc.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ const common = require('../common');
66
const gcTrackerMap = new WeakMap();
77
const gcTrackerTag = 'NODE_TEST_COMMON_GC_TRACKER';
88

9-
109
/**
1110
* Installs a garbage collection listener for the specified object.
1211
* Uses async_hooks for GC tracking, which may affect test functionality.
1312
* A full setImmediate() invocation passes between a global.gc() call and the listener being invoked.
14-
*
15-
* @param {Object} obj - The target object to track for garbage collection.
16-
* @param {Object} gcListener - The listener object containing the ongc callback.
13+
* @param {object} obj - The target object to track for garbage collection.
14+
* @param {object} gcListener - The listener object containing the ongc callback.
1715
* @param {Function} gcListener.ongc - The function to call when the target object is garbage collected.
1816
*/
1917
function onGC(obj, gcListener) {
@@ -42,9 +40,8 @@ function onGC(obj, gcListener) {
4240

4341
/**
4442
* Repeatedly triggers garbage collection until a specified condition is met or a maximum number of attempts is reached.
45-
*
46-
* @param {string|function} [name] - Optional name for the test, used in the rejection message if the condition is not met.
47-
* @param {function} condition - A function that returns true when the desired condition is met.
43+
* @param {string|Function} [name] - Optional name, used in the rejection message if the condition is not met.
44+
* @param {Function} condition - A function that returns true when the desired condition is met.
4845
* @returns {Promise} A promise that resolves when the condition is met, or rejects after 10 failed attempts.
4946
*/
5047
function gcUntil(name, condition) {

test/js-native-api/8_passing_wrapped/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ async function runTest() {
1616
obj1 = null;
1717
obj2 = null;
1818
await gcUntil('8_passing_wrapped',
19-
() => (addon.finalizeCount() === 2));
19+
() => (addon.finalizeCount() === 2));
2020
}
2121
runTest();

test/js-native-api/test_finalizer/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function runAsyncTests() {
3939
test_finalizer.addFinalizerWithJS(obj, () => { js_is_called = true; });
4040
})();
4141
await gcUntil('ensure JS finalizer called',
42-
() => (test_finalizer.getFinalizerCallCount() === 2));
42+
() => (test_finalizer.getFinalizerCallCount() === 2));
4343
assert(js_is_called);
4444
}
4545
runAsyncTests();

test/js-native-api/test_general/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async function runGCTests() {
8282
(() => test_general.wrap({}))();
8383
await gcUntil('deref_item() was called upon garbage collecting a ' +
8484
'wrapped object.',
85-
() => test_general.derefItemWasCalled());
85+
() => test_general.derefItemWasCalled());
8686

8787
// Ensure that removing a wrap and garbage collecting does not fire the
8888
// finalize callback.

test/js-native-api/test_general/testFinalizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ async function testFinalizeAndWrap() {
3232
test_general.addFinalizerOnly(finalizeAndWrap, common.mustCall());
3333
finalizeAndWrap = null;
3434
await gcUntil('test finalize and wrap',
35-
() => test_general.derefItemWasCalled());
35+
() => test_general.derefItemWasCalled());
3636
}
3737
testFinalizeAndWrap();

test/parallel/test-internal-util-weakreference.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Flags: --expose-internals --expose-gc
22
'use strict';
3+
require('../common');
34
const { gcUntil } = require('../common/gc');
45
const assert = require('assert');
56
const { WeakReference } = require('internal/util');

test/parallel/test-primitive-timer-leak.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
// Flags: --expose-gc
3-
const common = require('../common');
3+
require('../common');
44
const { onGC } = require('../common/gc');
55

66
// See https://github.com/nodejs/node/issues/53335

test/parallel/test-source-map-cjs-require-cache.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
'use strict';
9+
require('../common');
910
const { gcUntil } = require('../common/gc');
1011
const assert = require('node:assert');
1112
const { findSourceMap } = require('node:module');

0 commit comments

Comments
 (0)