wrapGroup = function (group, setUps, tearDowns) {
    var tests = {};

    var setUps = setUps ? setUps.slice(): [];
    var tearDowns = tearDowns ? tearDowns.slice(): [];

    if (group.setUp) {
        setUps.push(group.setUp);
        delete group.setUp;
    }
    if (group.tearDown) {
        tearDowns.unshift(group.tearDown);
        delete group.tearDown;
    }

    var keys = _keys(group);

    for (var i = 0; i < keys.length; i += 1) {
        var k = keys[i];
        if (typeof group[k] === 'function') {
            tests[k] = wrapTest(
                getSerialCallback(setUps),
                getSerialCallback(tearDowns),
                group[k]
            );
        }
        else if (typeof group[k] === 'object') {
            tests[k] = wrapGroup(group[k], setUps, tearDowns);
        }
    }
    return tests;
}
Wraps a group of tests with setUp and tearDown functions.
Used by testCase.

@param {Object} group
@param {Array} setUps - parent setUp functions
@param {Array} tearDowns - parent tearDown functions
@api private