it) is true, e.g.var isSecond = false; describe('1', function() { it('1', function() { isSecond = true; }); }); if (isSecond) describe('2', function() { it('2', function() {}); });
Is it possible to add describe only if some condition (which depends on dynamic data - callculated inside precedingit) is true, e.g.
describe('2', function() {
whenSecondIt('2', function() {});
});
Unfortunately there is no way how to mark the test as skipped from inside the test function (at least AFAIK), therefore the tests will be marked as PASSed by mocha.
Miroslav--You received this message because you are subscribed to a topic in the Google Groups "Mocha" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mochajs/HL9QyujUXag/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mochajs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.