testaro 10.6.2 → 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/watch.js +1 -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
|
};
|
package/watch.js
CHANGED
|
@@ -192,9 +192,7 @@ const runJob = async (job, isDirWatch) => {
|
|
|
192
192
|
else {
|
|
193
193
|
// Send the report to the server.
|
|
194
194
|
const ack = await writeNetReport(job);
|
|
195
|
-
|
|
196
|
-
console.log(JSON.stringify(ack, null, 2));
|
|
197
|
-
}
|
|
195
|
+
console.log(JSON.stringify(ack, null, 2));
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
198
|
// If the job failed:
|