/*!
 * KoliBri - The accessible HTML-Standard
 */
import { h } from "@stencil/core";
import { newSpecPage } from "@stencil/core/testing";
const propsToLabel = (props) => {
    return Object.entries(props)
        .map(([key, value]) => `${key}=${JSON.stringify(value)}`)
        .join(' ');
};
export const executeSnapshotTests = (ComponentName, components, propVariants) => {
    describe(ComponentName, () => {
        const testTable = propVariants.map((props) => [propsToLabel(props), props]);
        it.each(testTable)('should render with %s', async (_, props) => {
            const page = await newSpecPage({
                components,
                template: () => h(ComponentName, Object.assign({}, props)),
            });
            await page.waitForChanges();
            expect(page.root).toMatchSnapshot();
        });
    });
};
//# sourceMappingURL=snapshot-testing.js.map
