chore(tests): Adding in missing unit test.

This commit is contained in:
Matt Mix 2025-08-02 21:09:54 -04:00
parent d9195d4d91
commit 1e50241a4c

View File

@ -72,6 +72,14 @@ func TestMustRegister(t *testing.T) {
},
expected: 0,
},
{
name: "skip if metric exists",
metrics: []IMetric{
NewGaugeWithOpts(prometheus.GaugeOpts{Name: "existing_metric"}),
NewGaugeWithOpts(prometheus.GaugeOpts{Name: "existing_metric"}),
},
expected: 1,
},
}
for _, tt := range tests {