denoland / denoland/std

Add `assertNotThrows`

Open
#6,698 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

We have `assertThrows` to check if a function throws. When doing such testing I sometimes like to test for the inverse that it doesn't throw, but don't particular care about the return value.

**Describe the solution you'd like**

`assertNotThrows` or something like Node's `assert.doesNotThrow`

**Describe alternatives you've considered**

I guess the workaround is to assert the return value for now.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.