11cb0ef41Sopenharmony_ciimport '../common/index.mjs'; 21cb0ef41Sopenharmony_ciimport assert from 'node:assert'; 31cb0ef41Sopenharmony_ciimport { promisify } from 'node:util'; 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci// Test that customly promisified methods in [util.promisify.custom] 61cb0ef41Sopenharmony_ci// have appropriate names 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciimport fs from 'node:fs'; 91cb0ef41Sopenharmony_ciimport readline from 'node:readline'; 101cb0ef41Sopenharmony_ciimport stream from 'node:stream'; 111cb0ef41Sopenharmony_ciimport timers from 'node:timers'; 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ciassert.strictEqual( 151cb0ef41Sopenharmony_ci promisify(fs.exists).name, 161cb0ef41Sopenharmony_ci 'exists' 171cb0ef41Sopenharmony_ci); 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ciassert.strictEqual( 201cb0ef41Sopenharmony_ci promisify(readline.Interface.prototype.question).name, 211cb0ef41Sopenharmony_ci 'question', 221cb0ef41Sopenharmony_ci); 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_ciassert.strictEqual( 251cb0ef41Sopenharmony_ci promisify(stream.finished).name, 261cb0ef41Sopenharmony_ci 'finished' 271cb0ef41Sopenharmony_ci); 281cb0ef41Sopenharmony_ciassert.strictEqual( 291cb0ef41Sopenharmony_ci promisify(stream.pipeline).name, 301cb0ef41Sopenharmony_ci 'pipeline' 311cb0ef41Sopenharmony_ci); 321cb0ef41Sopenharmony_ci 331cb0ef41Sopenharmony_ciassert.strictEqual( 341cb0ef41Sopenharmony_ci promisify(timers.setImmediate).name, 351cb0ef41Sopenharmony_ci 'setImmediate' 361cb0ef41Sopenharmony_ci); 371cb0ef41Sopenharmony_ciassert.strictEqual( 381cb0ef41Sopenharmony_ci promisify(timers.setTimeout).name, 391cb0ef41Sopenharmony_ci 'setTimeout' 401cb0ef41Sopenharmony_ci); 41