caolan / caolan/nodeunit

How to fail() a test?

Open
#292 3 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.9k
Forks
359
PR merge metrics
No merged PRs in 30d

Description

I hate myself when I want to end a test and the only solution coming to my mind is:

```
foo(err) {
if (err) {
test.ok(false, 'error in foo, test finished');
test.done();
}
}
```

Would be useful some kind of `test.fail(error)` method? do I miss something?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.