mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 21:49:09 +08:00
34 lines
697 B
TypeScript
34 lines
697 B
TypeScript
import React = require('react');
|
|
import {render} from '@testing-library/react';
|
|
import '../../src/themes/default';
|
|
import {render as amisRender} from '../../src/index';
|
|
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();
|
|
});
|