mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
25 lines
521 B
TypeScript
25 lines
521 B
TypeScript
import React = require('react');
|
|
import {render, fireEvent} from '@testing-library/react';
|
|
import '../../src/themes/default';
|
|
import {render as amisRender} from '../../src/index';
|
|
import {makeEnv} from '../helper';
|
|
import 'jest-canvas-mock';
|
|
|
|
test('Renderer:qr-code', () => {
|
|
const {container} = render(
|
|
amisRender(
|
|
{
|
|
type: 'page',
|
|
body: {
|
|
type: 'qr-code',
|
|
value: 'amis'
|
|
}
|
|
},
|
|
{},
|
|
makeEnv({})
|
|
)
|
|
);
|
|
|
|
expect(container).toMatchSnapshot();
|
|
});
|