prometheus/web/ui/react-app/src/pages/graph/QueryStatsView.test.tsx
Boyko bab47b58f5 ReactUI: folder re-organization (#6601)
* remove redundant sanitizeHTML abstraction

Signed-off-by: blalov <boiskila@gmail.com>

* organize folders

Signed-off-by: blalov <boiskila@gmail.com>

* move hooks outside common folder

Signed-off-by: blalov <boiskila@gmail.com>

* move PathPrefix interface in types

Signed-off-by: blalov <boiskila@gmail.com>

* remove config folder

Signed-off-by: blalov <boiskila@gmail.com>

* remove redundant snapshots

Signed-off-by: blalov <boiskila@gmail.com>

* rename common folder

Signed-off-by: blalov <boiskila@gmail.com>

* merge utils files

Signed-off-by: Boyko Lalov <boiskila@gmail.com>

* sync with master

Signed-off-by: blalov <boiskila@gmail.com>
2020-01-14 19:34:48 +01:00

18 lines
654 B
TypeScript
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import * as React from 'react';
import { shallow } from 'enzyme';
import QueryStatsView from './QueryStatsView';
describe('QueryStatsView', () => {
it('renders props as query stats', () => {
const queryStatsProps = {
loadTime: 100,
resolution: 5,
resultSeries: 10000,
};
const queryStatsView = shallow(<QueryStatsView {...queryStatsProps} />);
expect(queryStatsView.prop('className')).toEqual('query-stats');
expect(queryStatsView.children().prop('className')).toEqual('float-right');
expect(queryStatsView.children().text()).toEqual('Load time: 100ms Resolution: 5s Result series: 10000');
});
});