mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
23 lines
534 B
TypeScript
23 lines
534 B
TypeScript
import React from 'react';
|
|
import renderer from 'react-test-renderer';
|
|
import PickerOption from './PickerOption';
|
|
|
|
const model = {
|
|
onSelect: () => {},
|
|
onFocus: () => {},
|
|
isFocused: () => {},
|
|
option: {
|
|
title: 'Model title',
|
|
avatarUrl: 'url/to/avatar',
|
|
label: 'User picker label',
|
|
},
|
|
className: 'class-for-user-picker',
|
|
};
|
|
|
|
describe('PickerOption', () => {
|
|
it('renders correctly', () => {
|
|
const tree = renderer.create(<PickerOption {...model} />).toJSON();
|
|
expect(tree).toMatchSnapshot();
|
|
});
|
|
});
|