import MarkdownIt from 'markdown-it'
import { describe, expect, it } from 'vitest'
import { windowPlugin } from '../src/node/container/window.js'
describe('windowPlugin', () => {
const md = new MarkdownIt({ html: true }).use(windowPlugin)
it('should work', () => {
const code = `\
::: window
content
:::
::: window title="test"
content
:::
::: window height="100px"

:::
::: window height="100" gap="20px"

:::
::: window
:::
::: window
:::
`
expect(md.render(code)).toMatchSnapshot()
})
it('legacy demo-wrapper container', () => {
const code = `\
::: demo-wrapper
content
:::
::: demo-wrapper title="test"
content
:::
::: demo-wrapper height="100px"

:::
::: demo-wrapper height="100" gap="20px"

:::
`
expect(md.render(code)).toMatchSnapshot()
})
})