pagean 4.4.2 → 6.0.1

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.
Files changed (96) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +9 -9
  3. package/docs/upgrade-guide.md +16 -0
  4. package/index.js +7 -4
  5. package/lib/config.js +2 -2
  6. package/lib/default-config.json +41 -39
  7. package/lib/externalFileUtils.js +1 -1
  8. package/lib/linkUtils.js +162 -25
  9. package/lib/logger.js +1 -1
  10. package/lib/report-template.handlebars +224 -209
  11. package/lib/schemaErrors.js +5 -4
  12. package/lib/testUtils.js +1 -1
  13. package/lib/tests.js +14 -14
  14. package/package.json +28 -30
  15. package/schemas/pageanrc.schema.json +199 -191
  16. package/.codeclimate.json +0 -8
  17. package/.depcheckrc.json +0 -3
  18. package/.dockerignore +0 -12
  19. package/.eslintrc.json +0 -19
  20. package/.gitattributes +0 -4
  21. package/.gitlab/gitlab-releaser.json +0 -16
  22. package/.htmlhintrc +0 -25
  23. package/.markdownlint.json +0 -13
  24. package/.pa11yci.json +0 -5
  25. package/.pageanrc.json +0 -55
  26. package/.stylelintrc.json +0 -7
  27. package/CHANGELOG.md +0 -204
  28. package/gitlab.pageanrc.json +0 -16
  29. package/jest.config.json +0 -22
  30. package/static-server.pageanrc.json +0 -50
  31. package/tests/__snapshots__/config.test.js.snap +0 -591
  32. package/tests/__snapshots__/externalFileUtils.test.js.snap +0 -7
  33. package/tests/__snapshots__/index.test.js.snap +0 -30
  34. package/tests/__snapshots__/pagean.test.js.snap +0 -82
  35. package/tests/__snapshots__/pageanrc.test.js.snap +0 -759
  36. package/tests/__snapshots__/reporter.test.js.snap +0 -509
  37. package/tests/config.test.js +0 -264
  38. package/tests/externalFileUtils.test.js +0 -184
  39. package/tests/index.test.js +0 -181
  40. package/tests/linkUtils.test.js +0 -290
  41. package/tests/logger.test.js +0 -324
  42. package/tests/pagean.test.js +0 -85
  43. package/tests/pageanrc.test.js +0 -96
  44. package/tests/reporter.test.js +0 -82
  45. package/tests/schemaErrors.test.js +0 -88
  46. package/tests/test-cases/.htmlhintrc +0 -25
  47. package/tests/test-cases/brokenLinks.html +0 -22
  48. package/tests/test-cases/consoleLog.html +0 -11
  49. package/tests/test-cases/duplicateLinks.html +0 -22
  50. package/tests/test-cases/dynamicContent.html +0 -13
  51. package/tests/test-cases/externalScripts.html +0 -21
  52. package/tests/test-cases/horizontalScrollbar.html +0 -13
  53. package/tests/test-cases/htmlError.html +0 -11
  54. package/tests/test-cases/noExternalScripts.html +0 -12
  55. package/tests/test-cases/notDocumentLinks.html +0 -18
  56. package/tests/test-cases/pagean-results.json +0 -1
  57. package/tests/test-cases/scriptError404.html +0 -9
  58. package/tests/test-cases/slowLoad.html +0 -9
  59. package/tests/test-configs/cli-tests/.pageanrc.json +0 -28
  60. package/tests/test-configs/cli-tests/all-empty.pageanrc.json +0 -10
  61. package/tests/test-configs/cli-tests/all-errors.pageanrc.json +0 -69
  62. package/tests/test-configs/cli-tests/all-fail-cli.pageanrc.json +0 -9
  63. package/tests/test-configs/cli-tests/no-urls.pageanrc.json +0 -7
  64. package/tests/test-configs/cli-tests/pass-fail-cli.pageanrc.json +0 -14
  65. package/tests/test-configs/integration-tests/all-passing-tests.pageanrc.json +0 -63
  66. package/tests/test-configs/integration-tests/broken-links-error.pageanrc.json +0 -22
  67. package/tests/test-configs/integration-tests/console-error-reporter-cli-json.pageanrc.json +0 -20
  68. package/tests/test-configs/integration-tests/console-error-reporter-html.pageanrc.json +0 -19
  69. package/tests/test-configs/integration-tests/console-error.pageanrc.json +0 -16
  70. package/tests/test-configs/integration-tests/console-output.pageanrc.json +0 -16
  71. package/tests/test-configs/integration-tests/external-scripts-error.pageanrc.json +0 -19
  72. package/tests/test-configs/integration-tests/horizontal-scrollbar.pageanrc.json +0 -16
  73. package/tests/test-configs/integration-tests/html-error.pageanrc.json +0 -16
  74. package/tests/test-configs/integration-tests/page-load-time.pageanrc.json +0 -16
  75. package/tests/test-configs/unit-tests/empty-url-values.pageanrc.json +0 -9
  76. package/tests/test-configs/unit-tests/empty-urls.pageanrc.json +0 -3
  77. package/tests/test-configs/unit-tests/empty.pageanrc.json +0 -2
  78. package/tests/test-configs/unit-tests/global-and-test-specific-settings-shorthand.pageanrc.json +0 -30
  79. package/tests/test-configs/unit-tests/global-and-test-specific-settings-test-props.pageanrc.json +0 -42
  80. package/tests/test-configs/unit-tests/global-and-test-specific-settings.pageanrc.json +0 -34
  81. package/tests/test-configs/unit-tests/global-test-settings.pageanrc.json +0 -15
  82. package/tests/test-configs/unit-tests/htmlhintrc-invalid.pageanrc.json +0 -7
  83. package/tests/test-configs/unit-tests/htmlhintrc-valid.pageanrc.json +0 -7
  84. package/tests/test-configs/unit-tests/ignored-links-denormalized.pageanrc.json +0 -18
  85. package/tests/test-configs/unit-tests/invalid.pageanrc.json +0 -0
  86. package/tests/test-configs/unit-tests/no-test-settings.pageanrc.json +0 -6
  87. package/tests/test-configs/unit-tests/project-no-test-settings.pageanrc.json +0 -7
  88. package/tests/test-configs/unit-tests/puppeteer-no-test-settings.pageanrc.json +0 -9
  89. package/tests/test-configs/unit-tests/reporters-empty.pageanrc.json +0 -7
  90. package/tests/test-configs/unit-tests/reporters-invalid-type.pageanrc.json +0 -9
  91. package/tests/test-configs/unit-tests/reporters-not-array.pageanrc.json +0 -6
  92. package/tests/test-configs/unit-tests/reporters-valid.pageanrc.json +0 -9
  93. package/tests/test-configs/unit-tests/test-specific-settings.pageanrc.json +0 -26
  94. package/tests/test-configs/unit-tests/url-types.pageanrc.json +0 -10
  95. package/tests/testUtils.test.js +0 -244
  96. package/tests/tests.test.js +0 -533
@@ -1,509 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`reporter should write expected JSON and HTML reports 1`] = `"{\\"project\\":\\"Pagean\\",\\"executionStart\\":\\"2020-12-26T01:39:09.777Z\\",\\"summary\\":{\\"tests\\":37,\\"passed\\":31,\\"warning\\":1,\\"failed\\":5},\\"results\\":[{\\"url\\":\\"tests/test-cases/consoleLog.html\\",\\"tests\\":[{\\"name\\":\\"should not have console errors\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have console output\\",\\"result\\":\\"failed\\",\\"data\\":[{\\"_type\\":\\"log\\",\\"_text\\":\\"This is a test\\"}]},{\\"name\\":\\"should not have a horizontal scrollbar\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should load page within 3 sec\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should have valid rendered HTML\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have external scripts\\",\\"result\\":\\"passed\\"}]},{\\"url\\":\\"tests/test-cases/dynamicContent.html\\",\\"tests\\":[{\\"name\\":\\"should not have console errors\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have console output\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have a horizontal scrollbar\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should load page within 3 sec\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should have valid rendered HTML\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have external scripts\\",\\"result\\":\\"passed\\"}]},{\\"url\\":\\"tests/test-cases/horizontalScrollbar.html\\",\\"tests\\":[{\\"name\\":\\"should not have console errors\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have console output\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have a horizontal scrollbar\\",\\"result\\":\\"failed\\"},{\\"name\\":\\"should load page within 3 sec\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should have valid rendered HTML\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have external scripts\\",\\"result\\":\\"passed\\"}]},{\\"url\\":\\"tests/test-cases/htmlError.html\\",\\"tests\\":[{\\"name\\":\\"should not have console errors\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have console output\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have a horizontal scrollbar\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should load page within 3 sec\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should have valid rendered HTML\\",\\"result\\":\\"failed\\",\\"data\\":[{\\"type\\":\\"error\\",\\"message\\":\\"The id value [ div1 ] must be unique.\\",\\"raw\\":\\" id=\\\\\\"div1\\\\\\"\\",\\"evidence\\":\\" <div id=\\\\\\"div1\\\\\\"></div>\\",\\"line\\":6,\\"col\\":9,\\"rule\\":{\\"id\\":\\"id-unique\\",\\"description\\":\\"The value of id attributes must be unique.\\",\\"link\\":\\"https://github.com/thedaviddias/HTMLHint/wiki/id-unique\\"}},{\\"type\\":\\"warning\\",\\"message\\":\\"An alt attribute must be present on <img> elements.\\",\\"raw\\":\\"<img>\\",\\"evidence\\":\\" <img>\\",\\"line\\":7,\\"col\\":9,\\"rule\\":{\\"id\\":\\"alt-require\\",\\"description\\":\\"The alt attribute of an <img> element must be present and alt attribute of area[href] and input[type=image] must have a value.\\",\\"link\\":\\"https://github.com/thedaviddias/HTMLHint/wiki/alt-require\\"}}]},{\\"name\\":\\"should not have external scripts\\",\\"result\\":\\"passed\\"}]},{\\"url\\":\\"tests/test-cases/scriptError404.html\\",\\"tests\\":[{\\"name\\":\\"should not have console errors\\",\\"result\\":\\"failed\\",\\"data\\":[{\\"_type\\":\\"error\\",\\"_text\\":\\"Failed to load resource: net::ERR_NAME_NOT_RESOLVED\\"}]},{\\"name\\":\\"should not have a horizontal scrollbar\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should load page within 3 sec\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should have valid rendered HTML\\",\\"result\\":\\"passed\\"}]},{\\"url\\":\\"tests/test-cases/slowLoad.html\\",\\"tests\\":[{\\"name\\":\\"should not have console errors\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have console output\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have a horizontal scrollbar\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should load page within 2 sec\\",\\"result\\":\\"failed\\",\\"data\\":{\\"pageLoadTime\\":2.842}},{\\"name\\":\\"should have valid rendered HTML\\",\\"result\\":\\"passed\\"}]},{\\"url\\":\\"tests/test-cases/externalScripts.html\\",\\"tests\\":[{\\"name\\":\\"should not have a horizontal scrollbar\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should load page within 3 sec\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should have valid rendered HTML\\",\\"result\\":\\"passed\\"},{\\"name\\":\\"should not have external scripts\\",\\"result\\":\\"warning\\",\\"data\\":[{\\"url\\":\\"https://code.jquery.com/jquery-3.4.1.slim.min.js\\",\\"localFile\\":\\"pagean-external-scripts\\\\\\\\code.jquery.com\\\\\\\\jquery-3.4.1.slim.min.js\\"},{\\"url\\":\\"https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js\\",\\"localFile\\":\\"pagean-external-scripts\\\\\\\\cdn.jsdelivr.net\\\\\\\\npm\\\\\\\\popper.js@1.16.0\\\\\\\\dist\\\\\\\\umd\\\\\\\\popper.min.js\\"},{\\"url\\":\\"file://bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js\\",\\"error\\":\\"Request failed with status code 404\\"},{\\"url\\":\\"https://code.jquery.com/jquery-3.4.1.slim.min.js\\",\\"localFile\\":\\"pagean-external-scripts\\\\\\\\code.jquery.com\\\\\\\\jquery-3.4.1.slim.min.js\\"}]}]}]}"`;
4
-
5
- exports[`reporter should write expected JSON and HTML reports 2`] = `
6
- "<!DOCTYPE html>
7
- <html lang=\\"en\\">
8
-
9
- <head>
10
- <title>Pagean Results</title>
11
- <style>
12
- html {
13
- margin: 0;
14
- padding: 0;
15
- }
16
-
17
- body {
18
- color: #333333;
19
- font-family: Arial, Helvetica, sans-serif;
20
- font-size: 0.85rem;
21
- padding: 1rem;
22
- margin: auto;
23
- max-width: 1000px;
24
- }
25
-
26
- ul {
27
- margin: 0;
28
- margin-block: 0;
29
- margin-inline: 0;
30
- padding: 0;
31
- padding-inline: 0;
32
- }
33
-
34
- li {
35
- list-style: none;
36
- }
37
-
38
- h1 {
39
- margin-block: 0;
40
- margin-inline: 0;
41
- margin: 1rem 0 0.75rem 0;
42
- }
43
-
44
- h2 {
45
- font-size: 1rem;
46
- }
47
-
48
- .project,
49
- .started {
50
- margin: 0;
51
- padding-bottom: 0.5rem;
52
- }
53
-
54
- .test-summary {
55
- display: flex;
56
- flex-direction: row;
57
- margin-bottom: 2rem;
58
- max-width: 50%;
59
- }
60
-
61
- .summary {
62
- background-color: #f4f4f4;
63
- border: 1px solid #333333;
64
- display: inline-block;
65
- flex: 1 1 10%;
66
- margin: 0 0.25rem;
67
- padding: 0.25rem 0.5rem;
68
- }
69
-
70
- .summary:first-of-type {
71
- margin-left: 0;
72
- }
73
-
74
- .summary:last-of-type {
75
- margin-right: 0;
76
- }
77
-
78
- .passed {
79
- background-color: #dff2bf;
80
- border: 1px solid #44760f;
81
- color: #44760f;
82
- }
83
-
84
- .failed {
85
- background-color: #ffbaba;
86
- border: 1px solid #ad000c;
87
- color: #ad000c;
88
- }
89
-
90
- .warning {
91
- background-color: #fdec96;
92
- border: 1px solid #7e6902;
93
- color: #7e6902;
94
- }
95
-
96
- .test-results h2 {
97
- margin-block-end: 0;
98
- margin-block-start: 1rem;
99
- }
100
-
101
- summary {
102
- cursor: pointer;
103
- list-style: none;
104
- }
105
-
106
- summary::-webkit-details-marker {
107
- display: none;
108
- }
109
-
110
- li.test {
111
- margin: 0.25rem 0;
112
- padding: 0.5rem 1rem;
113
- }
114
-
115
- .test .header {
116
- display: flex;
117
- flex-direction: row;
118
- }
119
-
120
- .test .header .name {
121
- flex: 1 1 75%;
122
- }
123
-
124
- .test .header .result {
125
- flex: 1 1 25%;
126
- text-align: right;
127
- }
128
-
129
- .test .data,
130
- .test .time,
131
- .test .error {
132
- padding-left: 10px;
133
- }
134
-
135
- .test .data h3 {
136
- font-size: inherit;
137
- font-weight: normal;
138
- margin: 0.25rem 0 0 0;
139
- margin-block: 0;
140
- }
141
-
142
- .test .data li {
143
- background-color: inherit;
144
- border-style: none;
145
- padding: 0.25rem;
146
- }
147
-
148
- .test .data li:hover {
149
- background-color: rgba(255, 255, 255, 0.1);
150
- border: 1px dotted;
151
- border-right: 4px solid;
152
- padding: calc(0.25rem - 1px);
153
- }
154
-
155
- .test .data pre {
156
- margin: 0 0 0.25rem 0;
157
- }
158
-
159
- .test .time {
160
- margin: 0.25rem 0 0 0;
161
- }
162
- </style>
163
- </head>
164
-
165
- <body>
166
- <header>
167
- <h1 id=\\"title\\">Pagean Results</h1>
168
- </header>
169
- <main>
170
- <h2 class=\\"project\\">Project: Pagean</h2>
171
- <section class=\\"started\\">Started: 2020-12-26T01:39:09.777Z</section>
172
- <section class=\\"test-summary\\">
173
- <div class=\\"summary\\">URLs: 7</div>
174
- <div class=\\"summary\\">Tests: 37</div>
175
- <div class=\\"summary passed\\">Passed: 31</div>
176
- <div class=\\"summary warning\\">Warning: 1</div>
177
- <div class=\\"summary failed\\">Failed: 5</div>
178
- </section>
179
- <section class=\\"test-results\\">
180
- <h2>URL: tests/test-cases/consoleLog.html</h2>
181
- <ul class=\\"tests\\">
182
- <li class=\\"test passed\\">
183
- <div class=\\"header\\">
184
- <div class=\\"name\\">should not have console errors</div>
185
- <div class=\\"result\\">passed</div>
186
- </div>
187
- </li>
188
- <li class=\\"test failed\\">
189
- <details>
190
- <summary class=\\"header\\">
191
- <div class=\\"name\\">should not have console output ⏷</div>
192
- <div class=\\"result\\">failed</div>
193
- </summary>
194
- <div class=\\"data\\">
195
- <h3>Messages:</h3>
196
- <ul>
197
- <li><pre>{
198
- &quot;_type&quot;: &quot;log&quot;,
199
- &quot;_text&quot;: &quot;This is a test&quot;
200
- }</pre></li>
201
- </ul>
202
- </div>
203
- </details>
204
- </li>
205
- <li class=\\"test passed\\">
206
- <div class=\\"header\\">
207
- <div class=\\"name\\">should not have a horizontal scrollbar</div>
208
- <div class=\\"result\\">passed</div>
209
- </div>
210
- </li>
211
- <li class=\\"test passed\\">
212
- <div class=\\"header\\">
213
- <div class=\\"name\\">should load page within 3 sec</div>
214
- <div class=\\"result\\">passed</div>
215
- </div>
216
- </li>
217
- <li class=\\"test passed\\">
218
- <div class=\\"header\\">
219
- <div class=\\"name\\">should have valid rendered HTML</div>
220
- <div class=\\"result\\">passed</div>
221
- </div>
222
- </li>
223
- <li class=\\"test passed\\">
224
- <div class=\\"header\\">
225
- <div class=\\"name\\">should not have external scripts</div>
226
- <div class=\\"result\\">passed</div>
227
- </div>
228
- </li>
229
- </ul>
230
- <h2>URL: tests/test-cases/dynamicContent.html</h2>
231
- <ul class=\\"tests\\">
232
- <li class=\\"test passed\\">
233
- <div class=\\"header\\">
234
- <div class=\\"name\\">should not have console errors</div>
235
- <div class=\\"result\\">passed</div>
236
- </div>
237
- </li>
238
- <li class=\\"test passed\\">
239
- <div class=\\"header\\">
240
- <div class=\\"name\\">should not have console output</div>
241
- <div class=\\"result\\">passed</div>
242
- </div>
243
- </li>
244
- <li class=\\"test passed\\">
245
- <div class=\\"header\\">
246
- <div class=\\"name\\">should not have a horizontal scrollbar</div>
247
- <div class=\\"result\\">passed</div>
248
- </div>
249
- </li>
250
- <li class=\\"test passed\\">
251
- <div class=\\"header\\">
252
- <div class=\\"name\\">should load page within 3 sec</div>
253
- <div class=\\"result\\">passed</div>
254
- </div>
255
- </li>
256
- <li class=\\"test passed\\">
257
- <div class=\\"header\\">
258
- <div class=\\"name\\">should have valid rendered HTML</div>
259
- <div class=\\"result\\">passed</div>
260
- </div>
261
- </li>
262
- <li class=\\"test passed\\">
263
- <div class=\\"header\\">
264
- <div class=\\"name\\">should not have external scripts</div>
265
- <div class=\\"result\\">passed</div>
266
- </div>
267
- </li>
268
- </ul>
269
- <h2>URL: tests/test-cases/horizontalScrollbar.html</h2>
270
- <ul class=\\"tests\\">
271
- <li class=\\"test passed\\">
272
- <div class=\\"header\\">
273
- <div class=\\"name\\">should not have console errors</div>
274
- <div class=\\"result\\">passed</div>
275
- </div>
276
- </li>
277
- <li class=\\"test passed\\">
278
- <div class=\\"header\\">
279
- <div class=\\"name\\">should not have console output</div>
280
- <div class=\\"result\\">passed</div>
281
- </div>
282
- </li>
283
- <li class=\\"test failed\\">
284
- <div class=\\"header\\">
285
- <div class=\\"name\\">should not have a horizontal scrollbar</div>
286
- <div class=\\"result\\">failed</div>
287
- </div>
288
- </li>
289
- <li class=\\"test passed\\">
290
- <div class=\\"header\\">
291
- <div class=\\"name\\">should load page within 3 sec</div>
292
- <div class=\\"result\\">passed</div>
293
- </div>
294
- </li>
295
- <li class=\\"test passed\\">
296
- <div class=\\"header\\">
297
- <div class=\\"name\\">should have valid rendered HTML</div>
298
- <div class=\\"result\\">passed</div>
299
- </div>
300
- </li>
301
- <li class=\\"test passed\\">
302
- <div class=\\"header\\">
303
- <div class=\\"name\\">should not have external scripts</div>
304
- <div class=\\"result\\">passed</div>
305
- </div>
306
- </li>
307
- </ul>
308
- <h2>URL: tests/test-cases/htmlError.html</h2>
309
- <ul class=\\"tests\\">
310
- <li class=\\"test passed\\">
311
- <div class=\\"header\\">
312
- <div class=\\"name\\">should not have console errors</div>
313
- <div class=\\"result\\">passed</div>
314
- </div>
315
- </li>
316
- <li class=\\"test passed\\">
317
- <div class=\\"header\\">
318
- <div class=\\"name\\">should not have console output</div>
319
- <div class=\\"result\\">passed</div>
320
- </div>
321
- </li>
322
- <li class=\\"test passed\\">
323
- <div class=\\"header\\">
324
- <div class=\\"name\\">should not have a horizontal scrollbar</div>
325
- <div class=\\"result\\">passed</div>
326
- </div>
327
- </li>
328
- <li class=\\"test passed\\">
329
- <div class=\\"header\\">
330
- <div class=\\"name\\">should load page within 3 sec</div>
331
- <div class=\\"result\\">passed</div>
332
- </div>
333
- </li>
334
- <li class=\\"test failed\\">
335
- <details>
336
- <summary class=\\"header\\">
337
- <div class=\\"name\\">should have valid rendered HTML ⏷</div>
338
- <div class=\\"result\\">failed</div>
339
- </summary>
340
- <div class=\\"data\\">
341
- <h3>Messages:</h3>
342
- <ul>
343
- <li><pre>{
344
- &quot;type&quot;: &quot;error&quot;,
345
- &quot;message&quot;: &quot;The id value [ div1 ] must be unique.&quot;,
346
- &quot;raw&quot;: &quot; id&#x3D;\\\\&quot;div1\\\\&quot;&quot;,
347
- &quot;evidence&quot;: &quot; &lt;div id&#x3D;\\\\&quot;div1\\\\&quot;&gt;&lt;/div&gt;&quot;,
348
- &quot;line&quot;: 6,
349
- &quot;col&quot;: 9,
350
- &quot;rule&quot;: {
351
- &quot;id&quot;: &quot;id-unique&quot;,
352
- &quot;description&quot;: &quot;The value of id attributes must be unique.&quot;,
353
- &quot;link&quot;: &quot;https://github.com/thedaviddias/HTMLHint/wiki/id-unique&quot;
354
- }
355
- }</pre></li>
356
- <li><pre>{
357
- &quot;type&quot;: &quot;warning&quot;,
358
- &quot;message&quot;: &quot;An alt attribute must be present on &lt;img&gt; elements.&quot;,
359
- &quot;raw&quot;: &quot;&lt;img&gt;&quot;,
360
- &quot;evidence&quot;: &quot; &lt;img&gt;&quot;,
361
- &quot;line&quot;: 7,
362
- &quot;col&quot;: 9,
363
- &quot;rule&quot;: {
364
- &quot;id&quot;: &quot;alt-require&quot;,
365
- &quot;description&quot;: &quot;The alt attribute of an &lt;img&gt; element must be present and alt attribute of area[href] and input[type&#x3D;image] must have a value.&quot;,
366
- &quot;link&quot;: &quot;https://github.com/thedaviddias/HTMLHint/wiki/alt-require&quot;
367
- }
368
- }</pre></li>
369
- </ul>
370
- </div>
371
- </details>
372
- </li>
373
- <li class=\\"test passed\\">
374
- <div class=\\"header\\">
375
- <div class=\\"name\\">should not have external scripts</div>
376
- <div class=\\"result\\">passed</div>
377
- </div>
378
- </li>
379
- </ul>
380
- <h2>URL: tests/test-cases/scriptError404.html</h2>
381
- <ul class=\\"tests\\">
382
- <li class=\\"test failed\\">
383
- <details>
384
- <summary class=\\"header\\">
385
- <div class=\\"name\\">should not have console errors ⏷</div>
386
- <div class=\\"result\\">failed</div>
387
- </summary>
388
- <div class=\\"data\\">
389
- <h3>Messages:</h3>
390
- <ul>
391
- <li><pre>{
392
- &quot;_type&quot;: &quot;error&quot;,
393
- &quot;_text&quot;: &quot;Failed to load resource: net::ERR_NAME_NOT_RESOLVED&quot;
394
- }</pre></li>
395
- </ul>
396
- </div>
397
- </details>
398
- </li>
399
- <li class=\\"test passed\\">
400
- <div class=\\"header\\">
401
- <div class=\\"name\\">should not have a horizontal scrollbar</div>
402
- <div class=\\"result\\">passed</div>
403
- </div>
404
- </li>
405
- <li class=\\"test passed\\">
406
- <div class=\\"header\\">
407
- <div class=\\"name\\">should load page within 3 sec</div>
408
- <div class=\\"result\\">passed</div>
409
- </div>
410
- </li>
411
- <li class=\\"test passed\\">
412
- <div class=\\"header\\">
413
- <div class=\\"name\\">should have valid rendered HTML</div>
414
- <div class=\\"result\\">passed</div>
415
- </div>
416
- </li>
417
- </ul>
418
- <h2>URL: tests/test-cases/slowLoad.html</h2>
419
- <ul class=\\"tests\\">
420
- <li class=\\"test passed\\">
421
- <div class=\\"header\\">
422
- <div class=\\"name\\">should not have console errors</div>
423
- <div class=\\"result\\">passed</div>
424
- </div>
425
- </li>
426
- <li class=\\"test passed\\">
427
- <div class=\\"header\\">
428
- <div class=\\"name\\">should not have console output</div>
429
- <div class=\\"result\\">passed</div>
430
- </div>
431
- </li>
432
- <li class=\\"test passed\\">
433
- <div class=\\"header\\">
434
- <div class=\\"name\\">should not have a horizontal scrollbar</div>
435
- <div class=\\"result\\">passed</div>
436
- </div>
437
- </li>
438
- <li class=\\"test failed\\">
439
- <details>
440
- <summary class=\\"header\\">
441
- <div class=\\"name\\">should load page within 2 sec ⏷</div>
442
- <div class=\\"result\\">failed</div>
443
- </summary>
444
- <div class=\\"time\\">Load time: 2.842s</div>
445
- </details>
446
- </li>
447
- <li class=\\"test passed\\">
448
- <div class=\\"header\\">
449
- <div class=\\"name\\">should have valid rendered HTML</div>
450
- <div class=\\"result\\">passed</div>
451
- </div>
452
- </li>
453
- </ul>
454
- <h2>URL: tests/test-cases/externalScripts.html</h2>
455
- <ul class=\\"tests\\">
456
- <li class=\\"test passed\\">
457
- <div class=\\"header\\">
458
- <div class=\\"name\\">should not have a horizontal scrollbar</div>
459
- <div class=\\"result\\">passed</div>
460
- </div>
461
- </li>
462
- <li class=\\"test passed\\">
463
- <div class=\\"header\\">
464
- <div class=\\"name\\">should load page within 3 sec</div>
465
- <div class=\\"result\\">passed</div>
466
- </div>
467
- </li>
468
- <li class=\\"test passed\\">
469
- <div class=\\"header\\">
470
- <div class=\\"name\\">should have valid rendered HTML</div>
471
- <div class=\\"result\\">passed</div>
472
- </div>
473
- </li>
474
- <li class=\\"test warning\\">
475
- <details>
476
- <summary class=\\"header\\">
477
- <div class=\\"name\\">should not have external scripts ⏷</div>
478
- <div class=\\"result\\">warning</div>
479
- </summary>
480
- <div class=\\"data\\">
481
- <h3>Messages:</h3>
482
- <ul>
483
- <li><pre>{
484
- &quot;url&quot;: &quot;https://code.jquery.com/jquery-3.4.1.slim.min.js&quot;,
485
- &quot;localFile&quot;: &quot;pagean-external-scripts\\\\\\\\code.jquery.com\\\\\\\\jquery-3.4.1.slim.min.js&quot;
486
- }</pre></li>
487
- <li><pre>{
488
- &quot;url&quot;: &quot;https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js&quot;,
489
- &quot;localFile&quot;: &quot;pagean-external-scripts\\\\\\\\cdn.jsdelivr.net\\\\\\\\npm\\\\\\\\popper.js@1.16.0\\\\\\\\dist\\\\\\\\umd\\\\\\\\popper.min.js&quot;
490
- }</pre></li>
491
- <li><pre>{
492
- &quot;url&quot;: &quot;file://bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js&quot;,
493
- &quot;error&quot;: &quot;Request failed with status code 404&quot;
494
- }</pre></li>
495
- <li><pre>{
496
- &quot;url&quot;: &quot;https://code.jquery.com/jquery-3.4.1.slim.min.js&quot;,
497
- &quot;localFile&quot;: &quot;pagean-external-scripts\\\\\\\\code.jquery.com\\\\\\\\jquery-3.4.1.slim.min.js&quot;
498
- }</pre></li>
499
- </ul>
500
- </div>
501
- </details>
502
- </li>
503
- </ul>
504
- </section>
505
- </main>
506
- </body>
507
-
508
- </html>"
509
- `;