github.com/thanos-io/thanos@v0.32.5/pkg/ui/react-app/src/pages/graph/QueryStatsView.test.tsx (about) 1 import * as React from 'react'; 2 import { shallow } from 'enzyme'; 3 import QueryStatsView from './QueryStatsView'; 4 5 describe('QueryStatsView', () => { 6 it('renders props as query stats', () => { 7 const queryStatsProps = { 8 loadTime: 100, 9 resolution: 5, 10 resultSeries: 10000, 11 }; 12 const queryStatsView = shallow(<QueryStatsView {...queryStatsProps} />); 13 expect(queryStatsView.prop('className')).toEqual('query-stats'); 14 expect(queryStatsView.children().prop('className')).toEqual('float-right'); 15 expect(queryStatsView.children().text()).toEqual('Load time: 100ms Resolution: 5s Result series: 10000'); 16 }); 17 });