azer / prova

Test runner based on Tape and Browserify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add timeout support

aghassemi opened this issue · comments

It would be nice to have timeout support, ideally configurable per test. Default could stay infinite as not to change the current behaviour. Without timeouts a bad test could leave the whole runner hanging which is not a good idea, specially for automated CI integration.

prova.setTimeout(ms)  // Applies to all tests, 
t.setTimeout(ms)  // Overrides the default timeout for a particular test.

Tape actually has that support, and it should work with Prova, can you give an example ?

btw: are you testing with browser or node ?

I didn't know tape supports this, I can't find any examples though.

I am doing both node and browser testing and a like a test to fail with a message like 'test timed-out because it did not finish in ms' whenever a test does not call .end() ( or the plan(n) number of assertions are reached) within a configurable ms.

I can't find anything related to this in tape. Could you point me to where in tape there is support for this?

Maybe this feature request makes more sense in tape than in Prova?