mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 16:45:43 -06:00
21 lines
661 B
TypeScript
21 lines
661 B
TypeScript
import React from 'react';
|
|
import { shallow } from 'enzyme';
|
|
import { QueryField } from './QueryField';
|
|
|
|
describe('<QueryField />', () => {
|
|
it('should render with null initial value', () => {
|
|
const wrapper = shallow(<QueryField query={null} />);
|
|
expect(wrapper.find('div').exists()).toBeTruthy();
|
|
});
|
|
|
|
it('should render with empty initial value', () => {
|
|
const wrapper = shallow(<QueryField query="" />);
|
|
expect(wrapper.find('div').exists()).toBeTruthy();
|
|
});
|
|
|
|
it('should render with initial value', () => {
|
|
const wrapper = shallow(<QueryField query="my query" />);
|
|
expect(wrapper.find('div').exists()).toBeTruthy();
|
|
});
|
|
});
|