@@ -17,8 +17,10 @@ import PingType from "../../../src/core/pings";
17
17
const sandbox = sinon . createSandbox ( ) ;
18
18
19
19
describe ( "LabeledMetric" , function ( ) {
20
+ const testAppId = `gleanjs.test.${ this . title } ` ;
21
+
20
22
beforeEach ( async function ( ) {
21
- await Glean . testResetGlean ( "gleanjs.unit.test" ) ;
23
+ await Glean . testResetGlean ( testAppId ) ;
22
24
// Disable ping uploading for it not to interfere with this tests.
23
25
sandbox . stub ( Glean [ "pingUploader" ] , "triggerUpload" ) . callsFake ( ( ) => Promise . resolve ( ) ) ;
24
26
} ) ;
@@ -34,7 +36,7 @@ describe("LabeledMetric", function() {
34
36
sendIfEmpty : false ,
35
37
} ) ;
36
38
37
- const labeledCounterMetric = new LabeledMetricType < CounterMetricType > (
39
+ const labeledCounterMetric = new LabeledMetricType (
38
40
{
39
41
category : "telemetry" ,
40
42
name : "labeled_counter_metric" ,
@@ -79,7 +81,7 @@ describe("LabeledMetric", function() {
79
81
sendIfEmpty : false ,
80
82
} ) ;
81
83
82
- const labeledCounterMetric = new LabeledMetricType < CounterMetricType > (
84
+ const labeledCounterMetric = new LabeledMetricType (
83
85
{
84
86
category : "telemetry" ,
85
87
name : "labeled_counter_metric" ,
@@ -126,7 +128,7 @@ describe("LabeledMetric", function() {
126
128
} ) ;
127
129
128
130
it ( "test __other__ label without predefined labels" , async function ( ) {
129
- const labeledCounterMetric = new LabeledMetricType < CounterMetricType > (
131
+ const labeledCounterMetric = new LabeledMetricType (
130
132
{
131
133
category : "telemetry" ,
132
134
name : "labeled_counter_metric" ,
@@ -151,7 +153,7 @@ describe("LabeledMetric", function() {
151
153
} ) ;
152
154
153
155
it ( "test __other__ label without predefined labels before Glean initialization" , async function ( ) {
154
- const labeledCounterMetric = new LabeledMetricType < CounterMetricType > (
156
+ const labeledCounterMetric = new LabeledMetricType (
155
157
{
156
158
category : "telemetry" ,
157
159
name : "labeled_counter_metric" ,
@@ -181,7 +183,7 @@ describe("LabeledMetric", function() {
181
183
} ) ;
182
184
183
185
it ( "Ensure invalid labels on labeled counter go to __other__" , async function ( ) {
184
- const labeledCounterMetric = new LabeledMetricType < CounterMetricType > (
186
+ const labeledCounterMetric = new LabeledMetricType (
185
187
{
186
188
category : "telemetry" ,
187
189
name : "labeled_counter_metric" ,
@@ -203,7 +205,7 @@ describe("LabeledMetric", function() {
203
205
} ) ;
204
206
205
207
it ( "Ensure invalid labels on labeled boolean go to __other__" , async function ( ) {
206
- const labeledBooleanMetric = new LabeledMetricType < BooleanMetricType > (
208
+ const labeledBooleanMetric = new LabeledMetricType (
207
209
{
208
210
category : "telemetry" ,
209
211
name : "labeled_boolean_metric" ,
@@ -225,7 +227,7 @@ describe("LabeledMetric", function() {
225
227
} ) ;
226
228
227
229
it ( "Ensure invalid labels on labeled string go to __other__" , async function ( ) {
228
- const labeledStringMetric = new LabeledMetricType < StringMetricType > (
230
+ const labeledStringMetric = new LabeledMetricType (
229
231
{
230
232
category : "telemetry" ,
231
233
name : "labeled_string_metric" ,
@@ -247,7 +249,7 @@ describe("LabeledMetric", function() {
247
249
} ) ;
248
250
249
251
it ( "test labeled string metric type" , async function ( ) {
250
- const labeledStringMetric = new LabeledMetricType < StringMetricType > (
252
+ const labeledStringMetric = new LabeledMetricType (
251
253
{
252
254
category : "telemetry" ,
253
255
name : "labeled_string_metric" ,
@@ -269,7 +271,7 @@ describe("LabeledMetric", function() {
269
271
} ) ;
270
272
271
273
it ( "test labeled boolean metric type" , async function ( ) {
272
- const metric = new LabeledMetricType < BooleanMetricType > (
274
+ const metric = new LabeledMetricType (
273
275
{
274
276
category : "telemetry" ,
275
277
name : "labeled_bool" ,
@@ -291,7 +293,7 @@ describe("LabeledMetric", function() {
291
293
} ) ;
292
294
293
295
it ( "dynamic labels regex mismatch" , async function ( ) {
294
- const labeledCounterMetric = new LabeledMetricType < CounterMetricType > (
296
+ const labeledCounterMetric = new LabeledMetricType (
295
297
{
296
298
category : "telemetry" ,
297
299
name : "labeled_counter_metric" ,
@@ -320,7 +322,7 @@ describe("LabeledMetric", function() {
320
322
} ) ;
321
323
322
324
it ( "dynamic labels regex allowed" , async function ( ) {
323
- const labeledCounterMetric = new LabeledMetricType < CounterMetricType > (
325
+ const labeledCounterMetric = new LabeledMetricType (
324
326
{
325
327
category : "telemetry" ,
326
328
name : "labeled_counter_metric" ,
@@ -350,7 +352,7 @@ describe("LabeledMetric", function() {
350
352
} ) ;
351
353
352
354
it ( "seen labels get reloaded across initializations" , async function ( ) {
353
- const labeledCounterMetric = new LabeledMetricType < CounterMetricType > (
355
+ const labeledCounterMetric = new LabeledMetricType (
354
356
{
355
357
category : "telemetry" ,
356
358
name : "labeled_metric" ,
0 commit comments