I'm using mocha in node.js with have bdd-style specs.
Is it possible to bail a sub-suite after the first error but continue it's parent/sibling suites?
Say I test different routes to access an api, then I want to abort a specific route if it's connection fails because there's no use hammering with calls if first action failed, but it can still attempt to check other things.
If a high level tests sees a server is completely down or misconfigured then I could abort instead of having to wait all the failing tests to timeout and fill the report with unnecessary mayhem.
I see the following answer but that's not what I want, it bails everything, which is too much. I want something to only bail a branch in the spec tree if an assertion fails.
If you want mocha to continue processing other test files after failing on one, you could use find to run a separate instance of mocha on each file:
find test/ -name "*.js" -exec mocha {} \;