mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
23 lines
520 B
TypeScript
23 lines
520 B
TypeScript
|
import React = require('react');
|
||
|
import {render, fireEvent} from 'react-testing-library';
|
||
|
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();
|
||
|
});
|