How to know when all tests (or all in a testCase) are done
- Dominant language
- JavaScript
- Stars
- 1.9k
- Forks
- 359
- PR merge metrics
- No merged PRs in 30d
Description
Is there any way to know when all of the tests are done, either via an event or via a callback? E.g. you are testing a node app, and are using either a remote service, or another service, etc. There is tearDown for the entire suite (or at least testCase) that you want to perform. setUp is easy, just call it before even setting up the testCase, but what about tearDown?
Conversely, can a testCase have another testCase? e.g.
tests = nodeunit.testCase({
setUp: // some wide setup
tearDown: // some wide teardown
testAll: nodeunit.testCase({
setUp: // per test setup
tearDown: // per test tearDown
testA: function() {... },
testB: function() {... },
testC: function() {... }
})
});
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the nodeunit.testCase lifecycle and how setUp and tearDown are currently handled. Determine whether the requested behavior is an event or callback for completion, nested testCase support, or both. Done should provide a defined way to perform teardown after all tests in a suite or test case, with nested cases behaving consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100