diff --git a/craft/src/components/media/VideoBlock.toHtml.test.ts b/craft/src/components/media/VideoBlock.toHtml.test.ts new file mode 100644 index 0000000..5158a46 --- /dev/null +++ b/craft/src/components/media/VideoBlock.toHtml.test.ts @@ -0,0 +1,61 @@ +import { describe, test, expect } from 'vitest'; +import { VideoBlock } from './VideoBlock'; + +const toHtml = (VideoBlock as any).toHtml; + +function embedSrc(videoUrl: string): string { + const { html } = toHtml({ videoUrl }, ''); + const m = html.match(/