Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ function lazyLoadRimraf() {
/**
* Asynchronously removes a directory.
* @param {string | Buffer | URL} path
* @param {{}} [options]
* @param {object} [options]
* @param {(err?: Error) => any} callback
* @returns {void}
*/
Expand Down Expand Up @@ -1149,7 +1149,7 @@ function rmdir(path, options, callback) {
/**
* Synchronously removes a directory.
* @param {string | Buffer | URL} path
* @param {{}} [options]
* @param {object} [options]
* @returns {void}
*/
function rmdirSync(path, options) {
Expand Down
6 changes: 3 additions & 3 deletions lib/internal/quic/quic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ class QuicSession {
#onstream = undefined;
/** @type {OnDatagramCallback|undefined} */
#ondatagram = undefined;
/** @type {{}} */
/** @type {object|undefined} */
#sessionticket = undefined;

static {
Expand Down Expand Up @@ -1050,7 +1050,7 @@ class QuicSession {

/**
* Get the session ticket associated with this session, if any.
* @type {any}
* @type {object|undefined}
*/
get sessionticket() {
QuicSession.#assertIsQuicSession(this);
Expand Down Expand Up @@ -1846,7 +1846,7 @@ class QuicEndpoint {

/**
* Initiates a session with a remote endpoint.
* @param {{}} address
* @param {object} address
* @param {SessionOptions} [options]
* @returns {QuicSession}
*/
Expand Down
3 changes: 1 addition & 2 deletions lib/internal/webstreams/adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,7 @@ function newStreamDuplexFromReadableWritablePair(pair = kEmptyObject, options =

/**
* @typedef {import('./queuingstrategies').QueuingStrategy} QueuingStrategy
* @typedef {{}} StreamBase
* @param {StreamBase} streamBase
* @param {object} streamBase
* @param {QueuingStrategy} strategy
* @returns {WritableStream}
*/
Expand Down
2 changes: 1 addition & 1 deletion test/common/heap.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function getHeapSnapshotOptionTests() {
}

/**
* Similar to @see {validateByRetainingPathFromNodes} but creates the snapshot from scratch.
* Similar to {@link validateByRetainingPathFromNodes} but creates the snapshot from scratch.
* @returns {object[]}
*/
function validateByRetainingPath(...args) {
Expand Down
4 changes: 2 additions & 2 deletions test/eslint.config_partial.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ export default [
message: 'Calling `.catch(common.mustNotCall())` will not detect never-settling promises. Use `.then(common.mustCall())` instead.',
},
{
selector: 'CallExpression[callee.type="MemberExpression"][callee.object.type="Identifier"][callee.object.name="assert"][callee.property.type="Identifier"][callee.property.name="ok"][arguments.0.type="CallExpression"][arguments.0.callee.type="MemberExpression"][arguments.0.callee.object.regex][arguments.0.callee.property.type="Identifier"][arguments.0.callee.property.name="test"]',
selector: 'CallExpression:matches([callee.type="Identifier"][callee.name="assert"], [callee.type="MemberExpression"][callee.object.type="Identifier"][callee.object.name="assert"][callee.property.type="Identifier"][callee.property.name="ok"])[arguments.0.type="CallExpression"][arguments.0.callee.type="MemberExpression"][arguments.0.callee.object.regex][arguments.0.callee.property.type="Identifier"][arguments.0.callee.property.name="test"]',
message: 'Use assert.match instead',
},
{
selector: 'CallExpression[callee.type="MemberExpression"][callee.object.type="Identifier"][callee.object.name="assert"][callee.property.type="Identifier"][callee.property.name="ok"][arguments.0.type="UnaryExpression"][arguments.0.operator="!"][arguments.0.argument.type="CallExpression"][arguments.0.argument.callee.type="MemberExpression"][arguments.0.argument.callee.object.regex][arguments.0.argument.callee.property.name="test"]',
selector: 'CallExpression:matches([callee.type="Identifier"][callee.name="assert"], [callee.type="MemberExpression"][callee.object.type="Identifier"][callee.object.name="assert"][callee.property.type="Identifier"][callee.property.name="ok"])[arguments.0.type="UnaryExpression"][arguments.0.operator="!"][arguments.0.argument.type="CallExpression"][arguments.0.argument.callee.type="MemberExpression"][arguments.0.argument.callee.object.regex][arguments.0.argument.callee.property.name="test"]',
message: 'Use assert.doesNotMatch instead',
},
],
Expand Down
15 changes: 3 additions & 12 deletions test/parallel/test-promises-warning-on-unhandled-rejection.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ process.on('warning', common.mustCall((warning) => {
case 1:
// Warning about rejection not being handled (will be next tick)
assert.strictEqual(warning.name, 'UnhandledPromiseRejectionWarning');
assert(
/Unhandled promise rejection/.test(warning.message),
'Expected warning message to contain "Unhandled promise rejection" ' +
`but did not. Had "${warning.message}" instead.`
);
assert.match(warning.message, /Unhandled promise rejection/);
break;
case 2:
// Number rejection error displayed. Note it's been stringified
Expand All @@ -31,17 +27,12 @@ process.on('warning', common.mustCall((warning) => {
case 3:
// Unhandled rejection warning (won't be handled next tick)
assert.strictEqual(warning.name, 'UnhandledPromiseRejectionWarning');
assert(
/Unhandled promise rejection/.test(warning.message),
'Expected warning message to contain "Unhandled promise rejection" ' +
`but did not. Had "${warning.message}" instead.`
);
assert.match(warning.message, /Unhandled promise rejection/);
break;
case 4:
// Rejection handled asynchronously.
assert.strictEqual(warning.name, 'PromiseRejectionHandledWarning');
assert(/Promise rejection was handled asynchronously/
.test(warning.message));
assert.match(warning.message, /Promise rejection was handled asynchronously/);
}
}, 5));

Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-snapshot-eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const file = fixtures.path('snapshot', 'mutate-fs.js');
console.log(child.stdout.toString());
assert.strictEqual(child.status, 0);
}
assert(/I am from the snapshot/.test(child.stdout.toString()));
assert.match(child.stdout.toString(), /I am from the snapshot/);
}

{
Expand All @@ -68,5 +68,5 @@ const file = fixtures.path('snapshot', 'mutate-fs.js');
console.log(child.stdout.toString());
assert.strictEqual(child.status, 0);
}
assert(/I am from the snapshot/.test(child.stdout.toString()));
assert.match(child.stdout.toString(), /I am from the snapshot/);
}
2 changes: 1 addition & 1 deletion test/parallel/test-tls-no-sslv3.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ process.on('exit', function() {
common.printSkipMessage('`openssl s_client -ssl3` not supported.');
} else {
assert.strictEqual(errors.length, 1);
assert(/:version too low/.test(errors[0].message));
assert.match(errors[0].message, /:version too low/);
}
});
Loading