import { describe, expect, it } from 'vitest';
import { patchHtmlForIframe } from '@/lib/utils/iframe';
describe('patchHtmlForIframe', () => {
it('injects the storage shim and sizing CSS after
', () => {
const out = patchHtmlForIframe(
't',
);
expect(out).toContain('data-iframe-storage-shim');
expect(out).toContain('data-iframe-patch');
});
it('runs the storage shim before the page scripts', () => {
const html =
'';
const out = patchHtmlForIframe(html);
// The shim must appear before the page's own