Skip to content

Commit

Permalink
fix: property size of undefined while accepting screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
KuznetsovRoman committed Aug 21, 2023
1 parent ad5f99e commit cab7ecb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/test-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,16 @@ export class TestAdapter {
return this._errorDetails;
}

getRefImg(stateName?: string): ImageData | undefined {
return _.get(_.find(this.assertViewResults, {stateName}), 'refImg');
getRefImg(stateName?: string): ImageData | Record<string, never> {
return _.get(_.find(this.assertViewResults, {stateName}), 'refImg', {});
}

getCurrImg(stateName?: string): ImageData | undefined {
return _.get(_.find(this.assertViewResults, {stateName}), 'currImg');
getCurrImg(stateName?: string): ImageData | Record<string, never> {
return _.get(_.find(this.assertViewResults, {stateName}), 'currImg', {});
}

getErrImg(): ImageBase64 | undefined {
return this.screenshot;
getErrImg(): ImageBase64 | Record<string, never> {
return this.screenshot || {};
}

prepareTestResult(): PrepareTestResultData {
Expand Down

0 comments on commit cab7ecb

Please sign in to comment.