Open
Description
I have some tests that are added conditionally based on environment. This produces incorrect test hierarchy. Here's a sample test file:
describe('Main Suite', function () {
it('Test 1 should be child of Main Suite', function () {});
// Conditions for including or excluding some suites or specs.
var condition1 = false;
var condition2 = false;
var condition3 = false;
if (condition1) {
it('Test 2 should be child of Main Suite, not child of Test1.', function () {});
if (condition2) {
if (condition3) {
describe('Suite 2 should be child of Main Suite, not child of Test1.', function () {});
}
}
}
});
This is the resulting test hierarchy:
This is the hierarchy I would expect to see:
Metadata
Metadata
Assignees
Labels
No labels