Skip to content

Commit 71fd175

Browse files
committed
Improve error messaging
1 parent f19edd1 commit 71fd175

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/framework/Testee.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ export class Testee { // TODO unified with testbed interface
234234
await testee.initialize(description.program, description.args ?? []).catch((o) => {
235235
return Promise.reject(o)
236236
});
237-
}), 1).catch((e: Error) => {
237+
}), 1).catch((e: string) => {
238238
const result = new StepOutcome(step);
239-
testee.states.set(description.title, result.update((e.message.includes('timeout')) ? Outcome.timedout : Outcome.error, e.message));
239+
testee.states.set(description.title, result.update((e.includes('timeout')) ? Outcome.timedout : Outcome.error, e));
240240
});
241241
}
242242

src/manage/Uploader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class EmulatorUploader extends Uploader {
166166

167167
reader.on('close', () => {
168168
that.emit(UploaderEvents.failed);
169-
reject(`Could not connect. Error: ${error}`);
169+
reject(`Testbed closed unexpectedly.`);
170170
});
171171
} else {
172172
that.emit(UploaderEvents.failed);

src/reporter/Results.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ abstract class AbstractAggregateResult implements AggregateResult {
4848
aggregate(outcomes: Result[]) {
4949
this.subOutcomes = outcomes;
5050
this.outcome = this.check();
51+
if (this.clarification.length === 0) this.clarification = this.subOutcomes.flatMap(outcome => outcome.clarification).join('; ')
5152
}
5253

5354
outcomes(): Result[] {

0 commit comments

Comments
 (0)