@@ -38,11 +38,20 @@ describe('12_webvitalsAsCustomEvent', () => {
38
38
cexpect ( beacon . ty ) . to . equal ( 'pl' ) ;
39
39
} ) ;
40
40
41
+ expectOneMatching ( beacons , beacon => {
42
+ cexpect ( beacon . ty ) . to . equal ( 'cus' ) ;
43
+ cexpect ( beacon . ts ) . to . be . a ( 'string' ) ;
44
+ cexpect ( parseFloat ( beacon . d ) ) . to . be . above ( 3000 ) ;
45
+ cexpect ( beacon . n ) . to . equal ( 'instana-webvitals-LCP' ) ;
46
+ cexpect ( beacon . l ) . to . be . a ( 'string' ) ;
47
+ cexpect ( beacon . pl ) . to . equal ( pageLoadBeacon . t ) ;
48
+ cexpect ( beacon . m_id ) . to . match ( / ^ v \d + ( - \d + ) + $ / ) ;
49
+ } ) ;
50
+
41
51
// expectOneMatching(beacons, beacon => {
42
52
// cexpect(beacon.ty).to.equal('cus');
43
53
// cexpect(beacon.ts).to.be.a('string');
44
- // cexpect(parseFloat(beacon.d)).to.be.above(3000);
45
- // cexpect(beacon.n).to.equal('instana-webvitals-LCP');
54
+ // cexpect(beacon.n).to.equal('instana-webvitals-FID');
46
55
// cexpect(beacon.l).to.be.a('string');
47
56
// cexpect(beacon.pl).to.equal(pageLoadBeacon.t);
48
57
// cexpect(beacon.m_id).to.match(/^v\d+(-\d+)+$/);
@@ -51,7 +60,7 @@ describe('12_webvitalsAsCustomEvent', () => {
51
60
// expectOneMatching(beacons, beacon => {
52
61
// cexpect(beacon.ty).to.equal('cus');
53
62
// cexpect(beacon.ts).to.be.a('string');
54
- // cexpect(beacon.n).to.equal('instana-webvitals-FID ');
63
+ // cexpect(beacon.n).to.equal('instana-webvitals-CLS ');
55
64
// cexpect(beacon.l).to.be.a('string');
56
65
// cexpect(beacon.pl).to.equal(pageLoadBeacon.t);
57
66
// cexpect(beacon.m_id).to.match(/^v\d+(-\d+)+$/);
@@ -60,20 +69,11 @@ describe('12_webvitalsAsCustomEvent', () => {
60
69
// expectOneMatching(beacons, beacon => {
61
70
// cexpect(beacon.ty).to.equal('cus');
62
71
// cexpect(beacon.ts).to.be.a('string');
63
- // cexpect(beacon.n).to.equal('instana-webvitals-CLS ');
72
+ // cexpect(beacon.n).to.equal('instana-webvitals-INP ');
64
73
// cexpect(beacon.l).to.be.a('string');
65
74
// cexpect(beacon.pl).to.equal(pageLoadBeacon.t);
66
75
// cexpect(beacon.m_id).to.match(/^v\d+(-\d+)+$/);
67
76
// });
68
-
69
- expectOneMatching ( beacons , beacon => {
70
- cexpect ( beacon . ty ) . to . equal ( 'cus' ) ;
71
- cexpect ( beacon . ts ) . to . be . a ( 'string' ) ;
72
- cexpect ( beacon . n ) . to . equal ( 'instana-webvitals-INP' ) ;
73
- cexpect ( beacon . l ) . to . be . a ( 'string' ) ;
74
- cexpect ( beacon . pl ) . to . equal ( pageLoadBeacon . t ) ;
75
- cexpect ( beacon . m_id ) . to . match ( / ^ v \d + ( - \d + ) + $ / ) ;
76
- } ) ;
77
77
} ) ;
78
78
} ) ;
79
79
} ) ;
0 commit comments