testaro 10.6.3 → 10.6.4
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/tests/ibm.js +10 -3
package/package.json
CHANGED
package/tests/ibm.js
CHANGED
|
@@ -94,8 +94,15 @@ const trimReport = (report, withItems, rules) => {
|
|
|
94
94
|
// Performs an IBM test and returns the result.
|
|
95
95
|
const doTest = async (content, withItems, timeLimit, rules) => {
|
|
96
96
|
// Conduct the test and get the result.
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
let report;
|
|
98
|
+
try {
|
|
99
|
+
report = await run(content, timeLimit);
|
|
100
|
+
}
|
|
101
|
+
catch(error) {
|
|
102
|
+
console.log(`ibm test failed ${error.message.slice(0, 100)}...`);
|
|
103
|
+
report = null;
|
|
104
|
+
}
|
|
105
|
+
// If the test did not crash or time out:
|
|
99
106
|
if (report) {
|
|
100
107
|
// Delete any report files.
|
|
101
108
|
try {
|
|
@@ -114,7 +121,7 @@ const doTest = async (content, withItems, timeLimit, rules) => {
|
|
|
114
121
|
else {
|
|
115
122
|
return {
|
|
116
123
|
prevented: true,
|
|
117
|
-
error: 'ERROR:
|
|
124
|
+
error: 'ERROR: ibm test failed or timed out'
|
|
118
125
|
};
|
|
119
126
|
}
|
|
120
127
|
};
|