grafana/public/app/features/explore/QueryField.test.tsx
kay delaney 68d6da77da
Chore: Update Slate to 0.47.8 (#19197)
* Chore: Update Slate to 0.47.8
Closes #17430
2019-09-23 12:26:05 +01:00

21 lines
682 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 initialQuery={null} />);
expect(wrapper.find('div').exists()).toBeTruthy();
});
it('should render with empty initial value', () => {
const wrapper = shallow(<QueryField initialQuery="" />);
expect(wrapper.find('div').exists()).toBeTruthy();
});
it('should render with initial value', () => {
const wrapper = shallow(<QueryField initialQuery="my query" />);
expect(wrapper.find('div').exists()).toBeTruthy();
});
});