mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
34 lines
676 B
TypeScript
34 lines
676 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:container', () => {
|
|
const {container} = render(
|
|
amisRender(
|
|
{
|
|
type: 'page',
|
|
body: {
|
|
type: 'container',
|
|
className: 'bg-white',
|
|
body: [
|
|
{
|
|
type: 'tpl',
|
|
tpl: '内容1'
|
|
},
|
|
{
|
|
type: 'plain',
|
|
tpl: '内容2'
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{},
|
|
makeEnv({})
|
|
)
|
|
);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|