caolan / caolan/nodeunit

BUG: Asserting after `test.done()` is allowed

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

Description

``` javascript
exports.test1 = function(test) {
test.expect(1);
test.ok(true, 'is true');
test.done();

// this should throw an error, however it passes
test.ok(true, 'is true2');
};
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the example using test.ok after test.done and trace how those entry points handle completion and later assertions. The work is done when an assertion after test.done throws the expected error while assertions before completion retain their current behavior, with the regression covered by the project's tests.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.