amis2/packages/amis/__tests__/renderers/AMISRender.test.tsx
吴多益 28a90d94dd
feat: 新增 amis-render 组件, 用于渲染数据里的 amis 配置 (#7586)
* feat: 新增 amis-render 组件, 用于渲染数据里的 amis 配置

* type 改名为 amis

* 更新 snapshot

* 修复 snapshot 报错

* fix:input-table删除行记录动作问题

* feat: 范围类组件支持 extraName 拆成两个字段 (#7583)

* style: tr 的active 样式调整 close: #7585

* docs: 更新 React 官网链接

* docs: 添加 position 默认值示意 (#7592)

* chore:调用组件动作时找不到则throw Error

* feat: 新增 amis render 渲染组件

---------

Co-authored-by: lvxiaojiao <lvxiaojiao@baidu.com>
Co-authored-by: liaoxuezhi <2betop.cn@gmail.com>
Co-authored-by: liaoxuezhi <liaoxuezhi@icloud.com>
Co-authored-by: YangQi <yangfong2022@qq.com>
Co-authored-by: Allen <yupeng.fe@qq.com>
2023-08-01 10:13:24 +08:00

23 lines
471 B
TypeScript

import React = require('react');
import {render} from '@testing-library/react';
import '../../src';
import {render as amisRender} from '../../src';
import {makeEnv} from '../helper';
test('Renderer:amisRender test', () => {
const {container} = render(
amisRender(
{
type: 'amis',
value: {
type: 'tpl',
tpl: 'hello world'
}
},
{},
makeEnv({})
)
);
expect(container).toMatchSnapshot();
});