import { renderToString } from 'react-dom/server'; import { screen } from '@testing-library/react'; import { describe, expect, it } from 'vitest'; import { renderWithProviders } from '@/test/renderWithProviders'; import CmsDataIsland from './CmsDataIsland'; import CmsRegion from './CmsRegion'; describe('CmsRegion', () => { it('is plain HTML between two markers on the server', () => { const html = renderToString(

gestijld

, ); expect(html).toContain( '', ); expect(html).not.toContain('gestijld'); }); it('shows the styled content once it runs in the browser', async () => { await renderWithProviders(

gestijld

, ); expect(screen.getByText('gestijld')).toBeInTheDocument(); }); }); describe('CmsDataIsland', () => { it('writes the marker and the baked block, hidden, with the build as source', () => { const html = renderToString(); expect(html).toMatch( /