mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix histogram xaxis min/max tests
This commit is contained in:
parent
332ecd483f
commit
f0d1a9157f
@ -533,8 +533,8 @@ describe('grafanaGraph', () => {
|
|||||||
|
|
||||||
it('should not contain values lower than min', () => {
|
it('should not contain values lower than min', () => {
|
||||||
const nonZero = ctx.plotData[0].data.filter(t => t[1] > 0);
|
const nonZero = ctx.plotData[0].data.filter(t => t[1] > 0);
|
||||||
expect(Math.min.apply(Math, nonZero.map(t => t[0])) === 200);
|
expect(Math.min.apply(Math, nonZero.map(t => t[0]))).toBe(200);
|
||||||
expect(Math.max.apply(Math, nonZero.map(t => t[0])) === 300);
|
expect(Math.max.apply(Math, nonZero.map(t => t[0]))).toBe(300);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -554,8 +554,8 @@ describe('grafanaGraph', () => {
|
|||||||
|
|
||||||
it('should not contain values lower than min', () => {
|
it('should not contain values lower than min', () => {
|
||||||
const nonZero = ctx.plotData[0].data.filter(t => t[1] > 0);
|
const nonZero = ctx.plotData[0].data.filter(t => t[1] > 0);
|
||||||
expect(Math.min.apply(Math, nonZero.map(t => t[0])) === 100);
|
expect(Math.min.apply(Math, nonZero.map(t => t[0]))).toBe(100);
|
||||||
expect(Math.max.apply(Math, nonZero.map(t => t[0])) === 200);
|
expect(Math.max.apply(Math, nonZero.map(t => t[0]))).toBe(200);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -576,8 +576,8 @@ describe('grafanaGraph', () => {
|
|||||||
|
|
||||||
it('should not contain values lower than min', () => {
|
it('should not contain values lower than min', () => {
|
||||||
const nonZero = ctx.plotData[0].data.filter(t => t[1] > 0);
|
const nonZero = ctx.plotData[0].data.filter(t => t[1] > 0);
|
||||||
expect(Math.min.apply(Math, nonZero.map(t => t[0])) === 200);
|
expect(Math.min.apply(Math, nonZero.map(t => t[0]))).toBe(200);
|
||||||
expect(Math.max.apply(Math, nonZero.map(t => t[0])) === 200);
|
expect(Math.max.apply(Math, nonZero.map(t => t[0]))).toBe(200);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user