Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Promise return type
Some of the functions returned a promise instead of straight up `void`, `void` -> `Promise<void>`.
  • Loading branch information
VoltrexKeyva authored Apr 13, 2021
commit 79c37dac6c29e410378684c97095982da900fa62
4 changes: 2 additions & 2 deletions lib/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ assert.throws = function throws(promiseFn, ...args) {
* Expects `promiseFn` function or its value to reject.
* @param {() => Promise<any>} promiseFn
* @param {...any} [args]
* @returns {void}
* @returns {Promise<void>}
*/
assert.rejects = async function rejects(promiseFn, ...args) {
expectsError(rejects, await waitForActual(promiseFn), ...args);
Expand All @@ -936,7 +936,7 @@ assert.doesNotThrow = function doesNotThrow(fn, ...args) {
* Expects `fn` or its value to not reject.
* @param {() => Promise<any>} fn
* @param {...any} [args]
* @returns {void}
* @returns {Promise<void>}
*/
assert.doesNotReject = async function doesNotReject(fn, ...args) {
expectsNoError(doesNotReject, await waitForActual(fn), ...args);
Expand Down