function multipleRoleTestHelper(roles, validIdx) {
        return function() {
            var expectedRoles = roles.map(createExpectedRoleObject);
            var expected = {
                roles: expectedRoles
            };
            if (validIdx >= 0) {
                expected.valid = true;
                expected.applied = expectedRoles[validIdx];
            }
            else {
                expected.valid = false;
            }
            var element = document.createElement('div');
            element.setAttribute('role', roles.join(' '));
            var actual = axs.utils.getRoles(element);
            deepEqual(actual, expected);
        };
    }
Helper for multiple role tests.
@param {!Array<string>} roles Strings to set in the 'role' attribute of the element under test.
@param {!number} validIdx The index of the expected applied (valid) ARIA role in the array above
   or a negative number if there are no valid roles.
@return {Function} A test function for qunit.