Add integration tests

This commit is contained in:
Sergey Dolin 2023-07-03 20:25:25 +02:00
parent 57aa6deac4
commit 765f3db869
3 changed files with 6 additions and 7 deletions

4
dist/index.js vendored
View File

@ -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}`);

View File

@ -27,7 +27,7 @@ export class Issue implements IIssue {
constructor(
options: Readonly<IIssuesProcessorOptions>,
issue: Readonly<OctokitIssue | Readonly<IIssue>>
issue: Readonly<OctokitIssue> | Readonly<IIssue>
) {
this._options = options;
this.title = issue.title;

View File

@ -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<OctokitIssue>);
});
return issueResult.data.map(
(issue): Issue =>
new Issue(this.options, issue as Readonly<OctokitIssue>)
);
} catch (error) {
throw Error(`Getting issues was blocked by the error: ${error.message}`);
}