mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 11:28:30 +08:00
24 lines
570 B
TypeScript
24 lines
570 B
TypeScript
import React = require('react');
|
|
import {render} from 'react-testing-library';
|
|
import '../../src/themes/default';
|
|
import {
|
|
render as amisRender
|
|
} from '../../src/index';
|
|
import { makeEnv } from '../helper';
|
|
|
|
test('Renderer:each', async () => {
|
|
const {
|
|
container
|
|
} = render(amisRender({
|
|
type: 'each',
|
|
items: {
|
|
type: 'tpl',
|
|
tpl: '<%= data.name %>'
|
|
},
|
|
value: [{name: 'jack'}, {name: 'martin'}],
|
|
className: 'show'
|
|
}, {}, makeEnv({
|
|
})));
|
|
|
|
expect(container).toMatchSnapshot();
|
|
}); |