mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-12 11:55:21 +08:00
18030b5415
* chore: 调整测试用例 * chore: 调整测试用例 * 补充测试用 * chore: 修复测试用例报错 * chore: 修复测试用例报错 * 更新 snapshot
26 lines
631 B
TypeScript
26 lines
631 B
TypeScript
import React = require('react');
|
|
import {render, fireEvent, waitFor} from '@testing-library/react';
|
|
import '../../src/themes/default';
|
|
import {render as amisRender} from '../../src/index';
|
|
import {makeEnv, wait} from '../helper';
|
|
import 'jest-canvas-mock';
|
|
|
|
test('Renderer:bar-code', async () => {
|
|
const {container, getByTestId} = render(
|
|
amisRender(
|
|
{
|
|
type: 'page',
|
|
body: {
|
|
type: 'barcode',
|
|
value: 'amis'
|
|
}
|
|
},
|
|
{},
|
|
makeEnv({})
|
|
)
|
|
);
|
|
await waitFor(() => expect(getByTestId('barcode')).toBeInTheDocument());
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|