mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:18:03 +08:00
25 lines
556 B
TypeScript
25 lines
556 B
TypeScript
import React = require('react');
|
|
import {render, waitFor} from '@testing-library/react';
|
|
|
|
import '../../src';
|
|
import {render as amisRender} from '../../src';
|
|
import {makeEnv} from '../helper';
|
|
|
|
test('Renderer:markdown', async () => {
|
|
const {container, getByTestId} = render(
|
|
amisRender(
|
|
{
|
|
type: 'markdown',
|
|
value: '# title\n markdown **text**'
|
|
},
|
|
{},
|
|
makeEnv({})
|
|
)
|
|
);
|
|
|
|
await waitFor(() => {
|
|
expect(getByTestId('markdown-body')).toBeInTheDocument();
|
|
});
|
|
expect(container).toMatchSnapshot();
|
|
});
|