caolan / caolan/nodeunit

How to know when all tests (or all in a testCase) are done

Aperta
#72 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
1.9k
Fork
359
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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() {... }
})
});

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.