diff --git a/packages/grafana-ui/src/components/Sparkline/Sparkline.test.tsx b/packages/grafana-ui/src/components/Sparkline/Sparkline.test.tsx
index 9ad678132e9..2282d965a14 100644
--- a/packages/grafana-ui/src/components/Sparkline/Sparkline.test.tsx
+++ b/packages/grafana-ui/src/components/Sparkline/Sparkline.test.tsx
@@ -27,4 +27,48 @@ describe('Sparkline', () => {
render()
).not.toThrow();
});
+
+ it('should ot throw an error if there is a single value', () => {
+ const sparkline: FieldSparkline = {
+ x: {
+ name: 'x',
+ values: [1679839200000],
+ type: FieldType.time,
+ config: {},
+ },
+ y: {
+ name: 'y',
+ values: [1],
+ type: FieldType.number,
+ config: {},
+ state: {
+ range: { min: 1, max: 1, delta: 0 },
+ },
+ },
+ };
+ expect(() =>
+ render()
+ ).not.toThrow();
+ });
+
+ it('should ot throw an error if there are no values', () => {
+ const sparkline: FieldSparkline = {
+ x: {
+ name: 'x',
+ values: [],
+ type: FieldType.time,
+ config: {},
+ },
+ y: {
+ name: 'y',
+ values: [],
+ type: FieldType.number,
+ config: {},
+ state: {},
+ },
+ };
+ expect(() =>
+ render()
+ ).not.toThrow();
+ });
});