testilo 13.6.2 → 13.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "13.6.2",
3
+ "version": "13.7.0",
4
4
  "description": "Prepares and processes Testaro reports",
5
5
  "main": "aim.js",
6
6
  "scripts": {
@@ -52,6 +52,13 @@ exports.issueClasses = {
52
52
  wcag: '4.1.1',
53
53
  weight: 2,
54
54
  tools: {
55
+ nuVal: {
56
+ '^Duplicate attribute.*$': {
57
+ variable: true,
58
+ quality: 1,
59
+ what: 'Source code of the element contains 2 or more of the same attribute'
60
+ }
61
+ },
55
62
  testaro: {
56
63
  dupAtt: {
57
64
  variable: false,
@@ -140,6 +147,11 @@ exports.issueClasses = {
140
147
  variable: false,
141
148
  quality: 1,
142
149
  what: 'Interactive component has no programmatically associated name'
150
+ },
151
+ aria_widget_labelled: {
152
+ variable: false,
153
+ quality: 1,
154
+ what: 'Interactive component has no programmatically associated name'
143
155
  }
144
156
  }
145
157
  }
@@ -159,7 +171,7 @@ exports.issueClasses = {
159
171
  1010: {
160
172
  variable: false,
161
173
  quality: 1,
162
- what: 'Element with a region role has no mechanism that allows an accessible name to be calculated'
174
+ what: 'Element with a region role has no machanism allowing an accessible name to be calculated'
163
175
  }
164
176
  },
165
177
  ibm: {
@@ -167,6 +179,11 @@ exports.issueClasses = {
167
179
  variable: false,
168
180
  quality: 1,
169
181
  what: 'Element with a region role has no label that describes its purpose'
182
+ },
183
+ aria_region_labelled: {
184
+ variable: false,
185
+ quality: 1,
186
+ what: 'Element with a region role has no label'
170
187
  }
171
188
  }
172
189
  }
@@ -217,37 +234,42 @@ exports.issueClasses = {
217
234
  118: {
218
235
  variable: false,
219
236
  quality: 1,
220
- what: 'Text input element has no mechanism that allows an accessible name to be calculated'
237
+ what: 'Text input element has no machanism allowing an accessible name to be calculated'
221
238
  },
222
239
  370: {
223
240
  variable: false,
224
241
  quality: 1,
225
- what: 'Search input element has no mechanism that allows an accessible name to be calculated'
242
+ what: 'Search input element has no machanism allowing an accessible name to be calculated'
243
+ },
244
+ 372: {
245
+ variable: false,
246
+ quality: 1,
247
+ what: 'email input element has no machanism allowing an accessible name to be calculated'
226
248
  },
227
249
  375: {
228
250
  variable: false,
229
251
  quality: 1,
230
- what: 'input element with type="checkbox" has no mechanism that allows an accessible name to be calculated'
252
+ what: 'input element with type="checkbox" has no machanism allowing an accessible name to be calculated'
231
253
  },
232
254
  376: {
233
255
  variable: false,
234
256
  quality: 1,
235
- what: 'input element has no mechanism that allows an accessible name to be calculated'
257
+ what: 'input element has no machanism allowing an accessible name to be calculated'
236
258
  },
237
259
  507: {
238
260
  variable: false,
239
261
  quality: 1,
240
- what: 'Element with a radio role has no mechanism that allows an accessible name to be calculated'
262
+ what: 'Element with a radio role has no machanism allowing an accessible name to be calculated'
241
263
  },
242
264
  509: {
243
265
  variable: false,
244
266
  quality: 1,
245
- what: 'Element with a textbox role has no mechanism that allows an accessible name to be calculated'
267
+ what: 'Element with a textbox role has no machanism allowing an accessible name to be calculated'
246
268
  },
247
269
  510: {
248
270
  variable: false,
249
271
  quality: 1,
250
- what: 'Element with a combobox role has no mechanism that allows an accessible name to be calculated'
272
+ what: 'Element with a combobox role has no machanism allowing an accessible name to be calculated'
251
273
  }
252
274
  },
253
275
  htmlcs: {
@@ -317,17 +339,10 @@ exports.issueClasses = {
317
339
  }
318
340
  }
319
341
  },
320
- imageInputNoText: {
342
+ imageButtonNoText: {
321
343
  wcag: '1.1.1',
322
344
  weight: 4,
323
345
  tools: {
324
- alfa: {
325
- r28: {
326
- variable: false,
327
- quality: 1,
328
- what: 'Image input element has no accessible name'
329
- }
330
- },
331
346
  axe: {
332
347
  'input-image-alt': {
333
348
  variable: false,
@@ -340,13 +355,11 @@ exports.issueClasses = {
340
355
  variable: false,
341
356
  quality: 1,
342
357
  what: 'Image submit button has no alt attribute'
343
- }
344
- },
345
- ibm: {
346
- WCAG20_Input_ExplicitLabelImage: {
358
+ },
359
+ 'AAA.1_1_1.H36': {
347
360
  variable: false,
348
361
  quality: 1,
349
- what: 'Input element of type image has no text alternative'
362
+ what: 'Image submit button has no alt attribute'
350
363
  }
351
364
  },
352
365
  qualWeb: {
@@ -370,6 +383,45 @@ exports.issueClasses = {
370
383
  }
371
384
  }
372
385
  },
386
+ imageInputNoText: {
387
+ wcag: '1.1.1',
388
+ weight: 4,
389
+ tools: {
390
+ alfa: {
391
+ r28: {
392
+ variable: false,
393
+ quality: 1,
394
+ what: 'image input element has no accessible name'
395
+ }
396
+ },
397
+ continuum: {
398
+ 131: {
399
+ variable: false,
400
+ quality: 1,
401
+ what: 'image input has no machanism allowing an accessible name to be calculated'
402
+ }
403
+ },
404
+ htmlcs: {
405
+ 'AAA.4_1_2.H91.InputImage.Name': {
406
+ variable: false,
407
+ quality: 1,
408
+ what: 'image input has no accessible name'
409
+ }
410
+ },
411
+ ibm: {
412
+ WCAG20_Input_ExplicitLabelImage: {
413
+ variable: false,
414
+ quality: 1,
415
+ what: 'input element of type image has no text alternative'
416
+ },
417
+ imagebutton_alt_exists: {
418
+ variable: false,
419
+ quality: 1,
420
+ what: 'input element of type image has no text alternative'
421
+ }
422
+ }
423
+ }
424
+ },
373
425
  figureNoText: {
374
426
  wcag: '1.1.1',
375
427
  weight: 4,
@@ -420,7 +472,7 @@ exports.issueClasses = {
420
472
  89: {
421
473
  variable: false,
422
474
  quality: 1,
423
- what: 'img element has no mechanism that allows an accessible name to be calculated'
475
+ what: 'img element has no machanism allowing an accessible name to be calculated'
424
476
  }
425
477
  },
426
478
  htmlcs: {
@@ -450,6 +502,11 @@ exports.issueClasses = {
450
502
  variable: false,
451
503
  quality: 1,
452
504
  what: 'Image has neither an alt attribute nor an ARIA label or title'
505
+ },
506
+ img_alt_null: {
507
+ variable: false,
508
+ quality: 1,
509
+ what: 'Image has a title attribute but an empty alt attribute'
453
510
  }
454
511
  },
455
512
  nuVal: {
@@ -916,7 +973,7 @@ exports.issueClasses = {
916
973
  736: {
917
974
  variable: false,
918
975
  quality: 1,
919
- what: 'Element with a dialog role has no mechanism that allows an accessible name to be calculated'
976
+ what: 'Element with a dialog role has no machanism allowing an accessible name to be calculated'
920
977
  }
921
978
  }
922
979
  }
@@ -956,7 +1013,7 @@ exports.issueClasses = {
956
1013
  249: {
957
1014
  variable: false,
958
1015
  quality: 1,
959
- what: 'object element has no mechanism that allows an accessible name to be calculated'
1016
+ what: 'object element has no machanism allowing an accessible name to be calculated'
960
1017
  }
961
1018
  },
962
1019
  htmlcs: {
@@ -1010,7 +1067,7 @@ exports.issueClasses = {
1010
1067
  252: {
1011
1068
  variable: false,
1012
1069
  quality: 1,
1013
- what: 'video element has no mechanism that allows an accessible name to be calculated'
1070
+ what: 'video element has no machanism allowing an accessible name to be calculated'
1014
1071
  }
1015
1072
  }
1016
1073
  }
@@ -1282,6 +1339,11 @@ exports.issueClasses = {
1282
1339
  quality: 1,
1283
1340
  what: 'Text input or select element label follows the input control'
1284
1341
  },
1342
+ input_label_before: {
1343
+ variable: false,
1344
+ quality: 1,
1345
+ what: 'Label text is after its text input or select element'
1346
+ },
1285
1347
  WCAG20_Input_LabelAfter: {
1286
1348
  variable: false,
1287
1349
  quality: 1,
@@ -1411,7 +1473,12 @@ exports.issueClasses = {
1411
1473
  237: {
1412
1474
  variable: false,
1413
1475
  quality: 1,
1414
- what: 'a element has no mechanism that allows an accessible name value to be calculated'
1476
+ what: 'a element has no machanism allowing an accessible name value to be calculated'
1477
+ },
1478
+ 238: {
1479
+ variable: false,
1480
+ quality: 1,
1481
+ what: 'Element with a link role has no machanism allowing an accessible name value to be calculated'
1415
1482
  }
1416
1483
  },
1417
1484
  htmlcs: {
@@ -1841,17 +1908,17 @@ exports.issueClasses = {
1841
1908
  116: {
1842
1909
  variable: false,
1843
1910
  quality: 1,
1844
- what: 'input element with type=button has no mechanism that allows an accessible name to be calculated'
1911
+ what: 'input element with type=button has no machanism allowing an accessible name to be calculated'
1845
1912
  },
1846
1913
  224: {
1847
1914
  variable: false,
1848
1915
  quality: 1,
1849
- what: 'button element has no mechanism that allows an accessible name to be calculated'
1916
+ what: 'button element has no machanism allowing an accessible name to be calculated'
1850
1917
  },
1851
1918
  511: {
1852
1919
  variable: false,
1853
1920
  quality: 1,
1854
- what: 'Element with a button role has no mechanism that allows an accessible name to be calculated'
1921
+ what: 'Element with a button role has no machanism allowing an accessible name to be calculated'
1855
1922
  }
1856
1923
  },
1857
1924
  htmlcs: {
@@ -2032,7 +2099,7 @@ exports.issueClasses = {
2032
2099
  123: {
2033
2100
  variable: false,
2034
2101
  quality: 1,
2035
- what: 'svg element has no mechanism that allows an accessible name to be calculated'
2102
+ what: 'svg element has no machanism allowing an accessible name to be calculated'
2036
2103
  }
2037
2104
  },
2038
2105
  qualWeb: {
@@ -2461,7 +2528,7 @@ exports.issueClasses = {
2461
2528
  228: {
2462
2529
  variable: false,
2463
2530
  quality: 1,
2464
- what: 'iframe has no mechanism that allows an accessible name to be calculated'
2531
+ what: 'iframe has no machanism allowing an accessible name to be calculated'
2465
2532
  }
2466
2533
  },
2467
2534
  htmlcs: {
@@ -2476,6 +2543,11 @@ exports.issueClasses = {
2476
2543
  variable: false,
2477
2544
  quality: 1,
2478
2545
  what: 'Inline frame has an empty or nonunique title attribute'
2546
+ },
2547
+ frame_title_exists: {
2548
+ variable: false,
2549
+ quality: 1,
2550
+ what: 'Inline frame has no title attribute'
2479
2551
  }
2480
2552
  },
2481
2553
  qualWeb: {
@@ -2501,6 +2573,11 @@ exports.issueClasses = {
2501
2573
  variable: false,
2502
2574
  quality: 1,
2503
2575
  what: 'Element does not have a valid role'
2576
+ },
2577
+ r110: {
2578
+ variable: false,
2579
+ quality: 1,
2580
+ what: 'No token in the value of the role attribute is valid'
2504
2581
  }
2505
2582
  },
2506
2583
  axe: {
@@ -2608,6 +2685,11 @@ exports.issueClasses = {
2608
2685
  quality: 1,
2609
2686
  what: 'Element has an invalid role'
2610
2687
  },
2688
+ aria_role_allowed: {
2689
+ variable: false,
2690
+ quality: 1,
2691
+ what: 'Element has an invalid role'
2692
+ },
2611
2693
  aria_eventhandler_role_valid: {
2612
2694
  variable: false,
2613
2695
  quality: 1,
@@ -2716,6 +2798,11 @@ exports.issueClasses = {
2716
2798
  variable: false,
2717
2799
  quality: 1,
2718
2800
  what: 'ARIA attribute is invalid for the role of its element'
2801
+ },
2802
+ aria_attribute_value_valid: {
2803
+ variable: false,
2804
+ quality: 1,
2805
+ what: 'Value of an attribute on the element is not valid'
2719
2806
  }
2720
2807
  },
2721
2808
  nuVal: {
@@ -2774,11 +2861,21 @@ exports.issueClasses = {
2774
2861
  quality: 1,
2775
2862
  what: 'link element has a sizes attribute but no icon-type rel attribute'
2776
2863
  },
2864
+ 'An input element with a type attribute whose value is hidden must not have any aria-* attributes.': {
2865
+ variable: false,
2866
+ quality: 1,
2867
+ what: 'hidden-type input element has an ARIA attribute'
2868
+ },
2777
2869
  'The sizes attribute may be specified only if the srcset attribute is also present.': {
2778
2870
  variable: false,
2779
2871
  quality: 1,
2780
2872
  what: 'Element has a sizes attribute but no srcset attribute'
2781
2873
  },
2874
+ 'The sizes attribute must only be specified if the srcset attribute is also specified.': {
2875
+ variable: false,
2876
+ quality: 1,
2877
+ what: 'Element has a sizes attribute but no srcset attribute'
2878
+ },
2782
2879
  '^Bad value for attribute (?:width|height) on element img: The empty string is not a valid non-negative integer.*$': {
2783
2880
  variable: true,
2784
2881
  quality: 1,
@@ -3115,7 +3212,12 @@ exports.issueClasses = {
3115
3212
  'The aria-checked attribute should not be used on an input element which has a type attribute whose value is checkbox.': {
3116
3213
  variable: false,
3117
3214
  quality: 1,
3118
- what: 'input element with type="checkbox" has an aria-checked attribute'
3215
+ what: 'input element with type checkbox has an aria-checked attribute'
3216
+ },
3217
+ 'The aria-checked attribute must not be used on an input element which has a type attribute whose value is checkbox.': {
3218
+ variable: false,
3219
+ quality: 1,
3220
+ what: 'input element with type checkbox has an aria-checked attribute'
3119
3221
  },
3120
3222
  'An img element with no alt attribute must not have any aria-* attributes other than aria-hidden.': {
3121
3223
  variable: false,
@@ -3229,6 +3331,11 @@ exports.issueClasses = {
3229
3331
  variable: false,
3230
3332
  quality: 1,
3231
3333
  what: 'autocomplete attribute token is not appropriate for the input form field'
3334
+ },
3335
+ input_autocomplete_valid: {
3336
+ variable: false,
3337
+ quality: 1,
3338
+ what: 'autocomplete attribute has an incorrect value'
3232
3339
  }
3233
3340
  },
3234
3341
  nuVal: {
@@ -4292,7 +4399,7 @@ exports.issueClasses = {
4292
4399
  114: {
4293
4400
  variable: false,
4294
4401
  quality: 1,
4295
- what: 'select element has no mechanism that allows an accessible name to be calculated'
4402
+ what: 'select element has no machanism allowing an accessible name to be calculated'
4296
4403
  }
4297
4404
  },
4298
4405
  htmlcs: {
@@ -4398,6 +4505,11 @@ exports.issueClasses = {
4398
4505
  variable: false,
4399
4506
  quality: 1,
4400
4507
  what: 'Input is in a different group than another with the name'
4508
+ },
4509
+ input_checkboxes_grouped: {
4510
+ variable: false,
4511
+ quality: 1,
4512
+ what: 'checkbox input is not grouped with others with the same name'
4401
4513
  }
4402
4514
  },
4403
4515
  testaro: {
@@ -4450,7 +4562,7 @@ exports.issueClasses = {
4450
4562
  221: {
4451
4563
  variable: false,
4452
4564
  quality: 1,
4453
- what: 'Element with a radiogroup role has no mechanism that allows an accessible name to be calculated'
4565
+ what: 'Element with a radiogroup role has no machanism allowing an accessible name to be calculated'
4454
4566
  }
4455
4567
  },
4456
4568
  htmlcs: {
@@ -5209,6 +5321,18 @@ exports.issueClasses = {
5209
5321
  quality: 1,
5210
5322
  what: 'complementary landmark (aside) is contained in another landmark'
5211
5323
  }
5324
+ },
5325
+ qualWeb: {
5326
+ 'QW-BP25': {
5327
+ variable: false,
5328
+ quality: 1,
5329
+ what: 'complementary landmark is not at the top level'
5330
+ },
5331
+ 'QW-BP26': {
5332
+ variable: false,
5333
+ quality: 1,
5334
+ what: 'complementary landmark is not at the top level'
5335
+ }
5212
5336
  }
5213
5337
  }
5214
5338
  },
@@ -5313,6 +5437,11 @@ exports.issueClasses = {
5313
5437
  variable: false,
5314
5438
  quality: 1,
5315
5439
  what: 'Multiple elements with a banner role are on the page'
5440
+ },
5441
+ aria_banner_single: {
5442
+ variable: false,
5443
+ quality: 1,
5444
+ what: 'More than one element with a banner role is on the page'
5316
5445
  }
5317
5446
  },
5318
5447
  qualWeb: {
@@ -5353,6 +5482,11 @@ exports.issueClasses = {
5353
5482
  variable: false,
5354
5483
  quality: 1,
5355
5484
  what: 'Element with a contentinfo role has no unique purpose label among the contentinfo-role elements'
5485
+ },
5486
+ aria_contentinfo_label_unique: {
5487
+ variable: false,
5488
+ quality: 1,
5489
+ what: 'Multiple elements with a contentinfo role have no unique labels'
5356
5490
  }
5357
5491
  }
5358
5492
  }
@@ -5373,6 +5507,18 @@ exports.issueClasses = {
5373
5507
  variable: false,
5374
5508
  quality: 1,
5375
5509
  what: 'Page, document, or application has more than one element with a contentinfo role'
5510
+ },
5511
+ aria_contentinfo_single: {
5512
+ variable: false,
5513
+ quality: 1,
5514
+ what: 'Multiple elements with a contentinfo role are on the page'
5515
+ }
5516
+ },
5517
+ qualWeb: {
5518
+ 'QW-BP21': {
5519
+ variable: false,
5520
+ quality: 0.5,
5521
+ what: 'There are multiple contentinfo or banner landmarks'
5376
5522
  }
5377
5523
  }
5378
5524
  }
@@ -5462,6 +5608,11 @@ exports.issueClasses = {
5462
5608
  variable: false,
5463
5609
  quality: 1,
5464
5610
  what: 'Element with a complementary role has no unique purpose label among the complementary-role elements'
5611
+ },
5612
+ aria_complementary_label_unique: {
5613
+ variable: false,
5614
+ quality: 1,
5615
+ what: 'Multiple elements with a complementary role have no unique labels'
5465
5616
  }
5466
5617
  }
5467
5618
  }
@@ -5475,6 +5626,11 @@ exports.issueClasses = {
5475
5626
  variable: false,
5476
5627
  quality: 1,
5477
5628
  what: 'Element with a banner role has no unique purpose label among the banner-role elements'
5629
+ },
5630
+ aria_banner_label_unique: {
5631
+ variable: false,
5632
+ quality: 1,
5633
+ what: 'Multiple elements with a banner role have no unique labels'
5478
5634
  }
5479
5635
  }
5480
5636
  }
@@ -5561,12 +5717,22 @@ exports.issueClasses = {
5561
5717
  Rpt_Aria_ComplementaryRequiredLabel_Implicit: {
5562
5718
  variable: false,
5563
5719
  quality: 1,
5564
- what: 'Element has a complementary role but has no label'
5720
+ what: 'Element with a complementary role has no label'
5721
+ },
5722
+ aria_complementary_labelled: {
5723
+ variable: false,
5724
+ quality: 1,
5725
+ what: 'Element with a complementary role has no label'
5565
5726
  },
5566
5727
  Rpt_Aria_ComplementaryLandmarkLabel_Implicit: {
5567
5728
  variable: false,
5568
5729
  quality: 1,
5569
5730
  what: 'Element with a complementary role has no visible purpose label'
5731
+ },
5732
+ aria_complementary_label_visible: {
5733
+ variable: false,
5734
+ quality: 1,
5735
+ what: 'Element with a complementary role has no visible label'
5570
5736
  }
5571
5737
  }
5572
5738
  }
@@ -5855,6 +6021,11 @@ exports.issueClasses = {
5855
6021
  variable: false,
5856
6022
  quality: 1,
5857
6023
  what: 'Form control does not have exactly one label'
6024
+ },
6025
+ form_label_unique: {
6026
+ variable: false,
6027
+ quality: 1,
6028
+ what: 'Form control has more than one label'
5858
6029
  }
5859
6030
  },
5860
6031
  wave: {
@@ -6492,6 +6663,11 @@ exports.issueClasses = {
6492
6663
  variable: false,
6493
6664
  quality: 0.5,
6494
6665
  what: 'Page provides no way to skip directly to the main content'
6666
+ },
6667
+ skip_main_exists: {
6668
+ variable: false,
6669
+ quality: 0.5,
6670
+ what: 'Page provides no way to quickly navigate to the main content'
6495
6671
  }
6496
6672
  },
6497
6673
  qualWeb: {
@@ -6755,6 +6931,16 @@ exports.issueClasses = {
6755
6931
  weight: 3,
6756
6932
  tools: {
6757
6933
  nuVal: {
6934
+ 'CSS: z-index: This number should be an integer.': {
6935
+ variable: false,
6936
+ quality: 1,
6937
+ what: 'z-index style property has a non-integer value'
6938
+ },
6939
+ '^CSS: .+: Character .+ is neither a decimal digit number.*$': {
6940
+ variable: true,
6941
+ quality: 1,
6942
+ what: 'Nonnumeric character in a numeric style property'
6943
+ },
6758
6944
  'CSS: Parse Error. Style sheets should not include HTML syntax.': {
6759
6945
  variable: false,
6760
6946
  quality: 1,
@@ -6913,6 +7099,11 @@ exports.issueClasses = {
6913
7099
  quality: 1,
6914
7100
  what: 'Element is closed while an element within it is unclosed'
6915
7101
  },
7102
+ '^End tag .+ implied, but there were open elements.*$': {
7103
+ variable: true,
7104
+ quality: 1,
7105
+ what: 'Element is implicitly closed while an element within it is unclosed'
7106
+ },
6916
7107
  '^Unclosed element .+$': {
6917
7108
  variable: true,
6918
7109
  quality: 1,
@@ -6956,11 +7147,26 @@ exports.issueClasses = {
6956
7147
  }
6957
7148
  },
6958
7149
  nuVal: {
6959
- 'No space between attributes.': {
7150
+ 'End tag clippath did not match the name of the current open element (path).': {
6960
7151
  variable: false,
6961
7152
  quality: 1,
7153
+ what: 'End tag clippath conflicts with the current open element.'
7154
+ },
7155
+ '^Self-closing syntax .+ used on a non-void HTML element.*$': {
7156
+ variable: true,
7157
+ quality: 1,
7158
+ what: 'Self-closing syntax used on a non-void element'
7159
+ },
7160
+ 'No space between attributes.': {
7161
+ variable: true,
7162
+ quality: 1,
6962
7163
  what: 'No space between attributes'
6963
7164
  },
7165
+ '^Bad value [^\ufffd]+ Tab, new line or carriage return found.*$': {
7166
+ variable: true,
7167
+ quality: 1,
7168
+ what: 'Attribute value contains an illegal spacing character'
7169
+ },
6964
7170
  'Saw <?. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)': {
6965
7171
  variable: false,
6966
7172
  quality: 1,
@@ -197,18 +197,20 @@ exports.scorer = report => {
197
197
  );
198
198
  // Add the summary log score to the score.
199
199
  const {jobData} = report;
200
- summary.log = Math.max(0, Math.round(
201
- logWeights.logCount * jobData.logCount
202
- + logWeights.logSize * jobData.logSize +
203
- + logWeights.errorLogCount * jobData.errorLogCount
204
- + logWeights.errorLogSize * jobData.errorLogSize
205
- + logWeights.prohibitedCount * jobData.prohibitedCount +
206
- + logWeights.visitRejectionCount * jobData.visitRejectionCount
207
- ));
208
- // Add the summary latency score to the score.
209
- summary.latency = Math.round(
210
- latencyWeight * (Math.max(0, jobData.visitLatency - normalLatency))
211
- );
200
+ if (jobData) {
201
+ summary.log = Math.max(0, Math.round(
202
+ logWeights.logCount * jobData.logCount
203
+ + logWeights.logSize * jobData.logSize +
204
+ + logWeights.errorLogCount * jobData.errorLogCount
205
+ + logWeights.errorLogSize * jobData.errorLogSize
206
+ + logWeights.prohibitedCount * jobData.prohibitedCount +
207
+ + logWeights.visitRejectionCount * jobData.visitRejectionCount
208
+ ));
209
+ // Add the summary latency score to the score.
210
+ summary.latency = Math.round(
211
+ latencyWeight * (Math.max(0, jobData.visitLatency - normalLatency))
212
+ );
213
+ }
212
214
  // Round the unrounded scores.
213
215
  Object.keys(summary).forEach(summaryTypeName => {
214
216
  summary[summaryTypeName] = Math.round(summary[summaryTypeName]);