You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Implement assert.rejects() and assert.doesNotReject() #272
Add async/Promise assertion functions to match Node.js assert API.
Missing Functions
assert.rejects(asyncFn, error?, message?) - Awaits the asyncFn promise or, if asyncFn is a function, calls the function and awaits the returned promise. It will then check that the promise is rejected.
assert.doesNotReject(asyncFn, error?, message?) - Awaits the asyncFn promise or, if asyncFn is a function, calls the function and awaits the returned promise. It will then check that the promise is not rejected.
Current Workarounds
// Instead of assert.rejects()awaitassert.throws(async()=>awaitasyncFn());// Instead of assert.doesNotReject()awaitassert.doesNotThrow(async()=>awaitasyncFn());
changed the title [-][Feature] [Feature Request] Implement assert.rejects() and assert.doesNotReject()[/-][+][Feature Request] Implement assert.rejects() and assert.doesNotReject()[/+]on Aug 20, 2026
Activity
[-][Feature] [Feature Request] Implement assert.rejects() and assert.doesNotReject()[/-][+][Feature Request] Implement assert.rejects() and assert.doesNotReject()[/+]