node.js - Bail suite on mocha (sub)suite error but continue next? -


i'm using mocha in node.js have bdd-style specs.

is possible bail sub-suite after first error continue it's parent/sibling suites?

say test different routes access api, want abort specific route if it's connection fails because there's no use hammering calls if first action failed, can still attempt check other things.

if high level tests sees server down or misconfigured abort instead of having wait failing tests timeout , fill report unnecessary mayhem.

i see following answer that's not want, bails everything, much. want bail branch in spec tree if assertion fails.

skip subsequent mocha tests spec if 1 fails

if want mocha continue processing other test files after failing on one, use find run separate instance of mocha on each file:

find test/ -name "*.js" -exec mocha {} \; 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -