From 60eb2389a370341028882d3e6cf18615d29acfdb Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 10 Mar 2026 02:19:01 +0100 Subject: [PATCH] Test every ASCII character in prometheus test The a and A felt lonely being the only letters included. Add the other letters in the ASCII character set as there was no good reason to leave them out. --- test/lib/prometheus.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/lib/prometheus.js b/test/lib/prometheus.js index ade1b09f..8ef24147 100644 --- a/test/lib/prometheus.js +++ b/test/lib/prometheus.js @@ -653,12 +653,11 @@ describe("lib/prometheus", function() { ); let labelValue = ""; + // Include every ASCII codepoint for (let i = 0; i < 128; i++) { - const char = String.fromCodePoint(i); - if (!/[1-9B-Zb-z]/.test(char)) { // exclude boring characters - labelValue += char; - } + labelValue += String.fromCodePoint(i); } + // Include Unicode codepoints from the basic and supplementary planes. labelValue += "©💣"; gauge.labels(labelValue, "2");