amis2/packages/amis/__tests__/renderers/JSON.test.tsx

30 lines
555 B
TypeScript
Raw Normal View History

import React = require('react');
import {render} from '@testing-library/react';
2022-06-02 10:00:09 +08:00
import '../../src';
import {render as amisRender} from '../../src';
import {makeEnv} from '../helper';
test('Renderer:json', () => {
const {container} = render(
amisRender(
{
type: 'page',
body: {
type: 'json',
value: {
a: 'a',
b: 'b',
c: {
d: 'd'
}
}
}
},
{},
makeEnv({})
)
);
expect(container).toMatchSnapshot();
});