@jrpool/kilotest 24.0.8 → 24.1.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.
- package/package.json +1 -1
- package/reportIssues/api.js +259 -0
- package/reportIssues/index.html +12 -4
- package/reportIssues/index.js +73 -155
- package/reportIssues/util.js +141 -0
- package/tutorial/index.html +313 -393
- package/tutorial/index.js +1 -1
- package/util.js +2 -2
package/tutorial/index.js
CHANGED
|
@@ -45,7 +45,7 @@ exports.saveComment = async content => {
|
|
|
45
45
|
comments = JSON.parse(existing);
|
|
46
46
|
}
|
|
47
47
|
catch (_) {
|
|
48
|
-
// File absent or
|
|
48
|
+
// File absent or unparsable; start a fresh array.
|
|
49
49
|
}
|
|
50
50
|
comments.push({timeStamp: new Date().toISOString(), content: sanitized});
|
|
51
51
|
await fs.writeFile(commentsPath, getJSON(comments));
|
package/util.js
CHANGED
|
@@ -136,7 +136,7 @@ const getTimeString = timeStamp => {
|
|
|
136
136
|
return '';
|
|
137
137
|
};
|
|
138
138
|
// Compares strings alphabetically and case-insensitively.
|
|
139
|
-
const alphaCompare = (a, b) => a.localeCompare(b, 'en', {sensitivity: '
|
|
139
|
+
const alphaCompare = (a, b) => a.localeCompare(b, 'en', {sensitivity: 'base'});
|
|
140
140
|
// Sorts strings alphabetically and case-insensitively.
|
|
141
141
|
const alphaSort = strings => strings.sort((a, b) => alphaCompare(a, b));
|
|
142
142
|
// Sorts objects by a property value.
|
|
@@ -649,7 +649,7 @@ exports.getWCAGLink = numericID => {
|
|
|
649
649
|
return `https://www.w3.org/WAI/WCAG22/Understanding/${wcagMap[numericID]}`;
|
|
650
650
|
};
|
|
651
651
|
// Gets page data from a report.
|
|
652
|
-
const getPageData = async (timeStamp, jobID) => {
|
|
652
|
+
const getPageData = exports.getPageData = async (timeStamp, jobID) => {
|
|
653
653
|
// Get the log of the report.
|
|
654
654
|
const log = await getLog(timeStamp, jobID, false);
|
|
655
655
|
// If this failed:
|