caolan / caolan/nodeunit

feature request: fail if no test functions are run

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

Description

If you run nodeunit on an empty directory, it just prints
OK: 0 assertions
and exits successfully.

It would be nice if this exited with an error status code by default. That way, the build will fail if you move the tests and forget to update the nodeunit invocation.

(The workaround is to use a custom reporter)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the nodeunit invocation and default reporter behavior when an empty directory produces zero assertions. Check how the custom reporter workaround determines failure, then add coverage for the default behavior and verify that a no-test run exits unsuccessfully while normal test runs still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.