testilo 19.2.0 → 19.2.2

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": "19.2.0",
3
+ "version": "19.2.2",
4
4
  "description": "Prepares and processes Testaro reports",
5
5
  "main": "aim.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  <p>The table below compares __pageCount__ web pages on <a href="https://www.w3.org/WAI/fundamentals/accessibility-intro/">accessibility</a>. The page names are links to the pages on the web. The scores are links to digests that explain in detail how the scores were computed.</p>
22
22
  <p>The pages were:</p>
23
23
  <ol id="summary">
24
- <li>Tested by <a href="https://www.npmjs.com/package/testaro">Testaro</a> with procedure <code>__scriptID__</code></li>
24
+ <li>Tested by <a href="https://www.npmjs.com/package/testaro">Testaro</a></li>
25
25
  <li>Scored by <a href="https://www.npmjs.com/package/testilo">Testilo</a> with procedure <code>__scorer__</code></li>
26
26
  <li>Digested by Testilo with procedure <code>__digester__</code></li>
27
27
  <li>Compared by Testilo with procedure <code>__comparer__</code></li>
@@ -26,17 +26,18 @@ const getData = async scoredReports => {
26
26
  for (const report of scoredReports) {
27
27
  // Get data.
28
28
  const {id, sources, score} = report;
29
- bodyData.push({
30
- id,
31
- org: sources.target.what,
32
- url: sources.target.which,
33
- score: score.summary.total
34
- });
29
+ if (id && sources && sources.script && score) {
30
+ bodyData.push({
31
+ id,
32
+ org: sources.target.what,
33
+ url: sources.target.which,
34
+ score: score.summary.total
35
+ });
36
+ }
35
37
  };
36
38
  // Return the report count, the script ID of the first report, and the data of all the reports.
37
39
  return {
38
40
  pageCount: scoredReports.length,
39
- script: scoredReports[0].sources.script,
40
41
  bodyData
41
42
  }
42
43
  };
@@ -64,7 +65,6 @@ const getTableBody = async bodyData => {
64
65
  const populateQuery = async (scoredReports, query) => {
65
66
  const data = await getData(scoredReports);
66
67
  query.pageCount = data.pageCount;
67
- query.scriptID = scoredReports[0].sources.script;
68
68
  query.scorer = 'tsp37';
69
69
  query.digester = 'tdp37';
70
70
  query.comparer = 'tcp37';