From 765f3db8691e7cbcb0ca0add03e00a76a8a223dc Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Mon, 3 Jul 2023 20:25:25 +0200 Subject: [PATCH] Add integration tests --- dist/index.js | 4 +--- src/classes/issue.ts | 2 +- src/classes/issues-processor.ts | 7 ++++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dist/index.js b/dist/index.js index bc01eb20..53c7a213 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1144,9 +1144,7 @@ class IssuesProcessor { page }); (_a = this.statistics) === null || _a === void 0 ? void 0 : _a.incrementFetchedItemsCount(issueResult.data.length); - return issueResult.data.map((issue) => { - return new issue_1.Issue(this.options, issue); - }); + return issueResult.data.map((issue) => new issue_1.Issue(this.options, issue)); } catch (error) { throw Error(`Getting issues was blocked by the error: ${error.message}`); diff --git a/src/classes/issue.ts b/src/classes/issue.ts index 5c2e75ad..b9063183 100644 --- a/src/classes/issue.ts +++ b/src/classes/issue.ts @@ -27,7 +27,7 @@ export class Issue implements IIssue { constructor( options: Readonly, - issue: Readonly> + issue: Readonly | Readonly ) { this._options = options; this.title = issue.title; diff --git a/src/classes/issues-processor.ts b/src/classes/issues-processor.ts index 1de975ce..821c83e0 100644 --- a/src/classes/issues-processor.ts +++ b/src/classes/issues-processor.ts @@ -572,9 +572,10 @@ export class IssuesProcessor { }); this.statistics?.incrementFetchedItemsCount(issueResult.data.length); - return issueResult.data.map((issue): Issue => { - return new Issue(this.options, issue as Readonly); - }); + return issueResult.data.map( + (issue): Issue => + new Issue(this.options, issue as Readonly) + ); } catch (error) { throw Error(`Getting issues was blocked by the error: ${error.message}`); }