function testConvert(initialColor, mode, result) {
                makeUI(initialColor);
                var buttonMap = {
                    "rgba": "$rgbaButton",
                    "hsla": "$hslButton",
                    "hex": "$hexButton"
                };
                colorEditor[buttonMap[mode]].trigger("click");
                expect(colorEditor.getColor().getOriginalInput()).toBe(result);
            }
Test whether converting the given color to the given mode results in the expected color.
@param {string} initialColor The color to convert.
@param {string} mode The mode to convert to: must be "rgba", "hsla", or "hex".
@param {string} result The expected result of the conversion.