import { markdownToPlatejs } from './markdown-to-platejs';
import { describe, it, expect } from 'vitest';
describe('markdownToPlatejs', () => {
it('should convert elaborate markdown to platejs', async () => {
const markdown = `# Welcome to the Plate Playground!
Experience a modern rich-text editor built with [Slate](https://slatejs.org) and [React](https://reactjs.org). This playground showcases just a part of Plate's capabilities. [Explore the documentation](/docs) to discover more.
## Collaborative Editing
Review and refine content seamlessly. Use [](/docs/suggestion) or to . Discuss changes using [comments](/docs/comment) on many text segments. You can even have annotations!
## AI-Powered Editing
Boost your productivity with integrated [AI SDK](/docs/ai). Press ⌘+J or Space in an empty line to:
* Generate content (continue writing, summarize, explain)
* Edit existing text (improve, fix grammar, change tone)
## Rich Content Editing
Structure your content with [headings](/docs/heading), [lists](/docs/list), and [quotes](/docs/blockquote). Apply [marks](/docs/basic-marks) like **bold**, _italic_, underline, ~~strikethrough~~, and \`code\`. Use [autoformatting](/docs/autoformat) for [Markdown](/docs/markdown)-like shortcuts (e.g., \\* for lists, # for H1).
> Blockquotes are great for highlighting important information.
\`\`\`javascript
function hello() {
console.info('Code blocks are supported!');
}
\`\`\`
Create [links](/docs/link), [@mention](/docs/mention) users like [Alice](mention:Alice), or insert [emojis](/docs/emoji) ✨. Use the [slash command](/docs/slash-command) (/) for quick access to elements.
### How Plate Compares
Plate offers many features out-of-the-box as free, open-source plugins.
| **Feature** | **Plate (Free & OSS)** | **Tiptap** |
| ------------------- | ---------------------- | --------------------- |
| AI | ✅ | Paid Extension |
| Comments | ✅ | Paid Extension |
| Suggestions | ✅ | Paid (Comments Pro) |
| Emoji Picker | ✅ | Paid Extension |
| Table of Contents | ✅ | Paid Extension |
| Drag Handle | ✅ | Paid Extension |
| Collaboration (Yjs) | ✅ | Hocuspocus (OSS/Paid) |
### Images and Media
Embed rich media like images directly in your content. Supports [Media uploads](/docs/media) and [drag & drop](/docs/dnd) for a smooth experience.

### Table of Contents
Here's an unordered list:
* First item with \`code snippet\`
* Second item with **bold text**
* Third item with _italic text_
* Nested item 1
* Nested item 2`;
const platejs = await markdownToPlatejs(markdown);
expect(platejs).toBeDefined();
});
});