testaro 62.0.1 → 62.0.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 +1 -1
- package/procs/standardize.js +1 -1
- package/tests/nuVnu.js +8 -18
package/package.json
CHANGED
package/procs/standardize.js
CHANGED
|
@@ -702,6 +702,6 @@ exports.standardize = act => {
|
|
|
702
702
|
convert(which, data, result, standardResult);
|
|
703
703
|
}
|
|
704
704
|
else {
|
|
705
|
-
console.log(`ERROR: Result of incomplete ${which || 'unknown'}act cannot be standardized`);
|
|
705
|
+
console.log(`ERROR: Result of incomplete ${which || 'unknown'} act cannot be standardized`);
|
|
706
706
|
}
|
|
707
707
|
};
|
package/tests/nuVnu.js
CHANGED
|
@@ -49,27 +49,17 @@ exports.reporter = async (page, report, actIndex) => {
|
|
|
49
49
|
}
|
|
50
50
|
// If any error was thrown:
|
|
51
51
|
catch (error) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
const errorMessage = error.message;
|
|
53
|
+
try {
|
|
54
|
+
// Parse it as JSON, i.e. a benign nuVnu result with at least 1 violation.
|
|
55
|
+
nuData = JSON.parse(error.message);
|
|
56
|
+
}
|
|
57
|
+
// If parsing it as JSON fails:
|
|
58
|
+
catch (error) {
|
|
59
|
+
// Report a genuine error.
|
|
57
60
|
data.prevented = true;
|
|
58
61
|
data.error = errorMessage;
|
|
59
62
|
}
|
|
60
|
-
// Otherwise, i.e. if it was not due to an incompatible Java version:
|
|
61
|
-
else {
|
|
62
|
-
try {
|
|
63
|
-
// Treat the error message as a JSON result reporting rule violations.
|
|
64
|
-
nuData = JSON.parse(error.message);
|
|
65
|
-
}
|
|
66
|
-
// But, if parsing it as JSON fails:
|
|
67
|
-
catch (error) {
|
|
68
|
-
// Report this.
|
|
69
|
-
data.prevented = true;
|
|
70
|
-
data.error = `Error getting result (${error.message.slice(0, 300)});`;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
63
|
}
|
|
74
64
|
// Delete the temporary file.
|
|
75
65
|
await fs.unlink(pagePath);
|