@@ -6,14 +6,12 @@ const common = require('../common');
66const gcTrackerMap = new WeakMap ( ) ;
77const 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 */
1917function 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 */
5047function gcUntil ( name , condition ) {
0 commit comments