mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 04:28:32 +08:00
18030b5415
* chore: 调整测试用例 * chore: 调整测试用例 * 补充测试用 * chore: 修复测试用例报错 * chore: 修复测试用例报错 * 更新 snapshot
25 lines
577 B
TypeScript
25 lines
577 B
TypeScript
import React = require('react');
|
|
import {render, waitFor} from '@testing-library/react';
|
|
|
|
import '../../src/themes/default';
|
|
import {render as amisRender} from '../../src/index';
|
|
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();
|
|
});
|