import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { buildEditorCsp, buildEditorHtml, CHANGE_THROTTLE_MS, isEditorNavigationAllowed, shouldBlockEditorRemoteImages, } from '../editor-html'; import { LIGHT_COLORS, DARK_COLORS } from '../../theme/tokens'; function extractScript(html: string): string { const m = html.match(/([\s\S]*?)<\/script>/); expect(m, 'page must contain an inline `: the page script // ended there, the rest of the reply ran as markup and a refresh meta took // the editor to a data:text/html page. it('keeps a quoted { const quoted = '

hello