mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-26 05:01:23 -08:00
ui: create a reproduction for https://github.com/prometheus/prometheus/issues/13292
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
This commit is contained in:
parent
69abd6d9f6
commit
ea97086484
27
web/ui/react-app/src/pages/graph/GraphHeatmapHelpers.test.ts
Normal file
27
web/ui/react-app/src/pages/graph/GraphHeatmapHelpers.test.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
import { isHeatmapData } from './GraphHeatmapHelpers';
|
||||
|
||||
describe('GraphHeatmapHelpers', () => {
|
||||
it('isHeatmapData should return false for a vector', () => {
|
||||
const data = {
|
||||
resultType: 'vector',
|
||||
result: [
|
||||
{
|
||||
metric: {
|
||||
__name__: 'my_gauge',
|
||||
job: 'target',
|
||||
},
|
||||
value: [1703091180.683, '6'],
|
||||
},
|
||||
],
|
||||
};
|
||||
expect(isHeatmapData(data)).toBe(false);
|
||||
});
|
||||
|
||||
it('isHeatmapData should return false for scalar resultType', () => {
|
||||
const data = {
|
||||
resultType: 'scalar',
|
||||
result: [1703091180.125, '1703091180.125'],
|
||||
};
|
||||
expect(isHeatmapData(data)).toBe(false);
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue