Best practices for organising deeply nested mocha tests?
Say you want to test the behaviour of a very complex state tree:
describe("A", function() {
describe("A.a", function() {
describe("A.a.0", function() {
// and so on...
});
describe("A.a.1", function() {
// and so on...
});
});
describe("A.b", function() {
// and so on...
});
});
describe("B", function() {
// and so on...
});
How do you organise these blocks? Do you first exclude the failing states (i.e. supplying 0 to a division goes in the "B" block)? Or do you group them by role and only then process every failing input?
(I guess it'd worth it to mention that I'm particularly interested in tests written for ethereum smart contracts)