mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-31 00:10:04 +08:00
Fix tests
This commit is contained in:
@@ -35,15 +35,15 @@ class MockPRFetcher {
|
||||
postReviewCommentCalls: { body: string; inReplyTo: number }[] = [];
|
||||
postIssueCommentCalls: { body: string }[] = [];
|
||||
|
||||
async getPullRequest(_owner: string, _repo: string, _prNumber: number): Promise<IGitHubPullRequest> {
|
||||
async getPullRequest(_owner: string, _repo: string, _prNumber: number, _etag?: string): Promise<{ data: IGitHubPullRequest | undefined; statusCode: number; etag?: string }> {
|
||||
if (!this.nextPR) {
|
||||
throw new Error('No mock PR');
|
||||
}
|
||||
return this.nextPR;
|
||||
return { data: this.nextPR, statusCode: 200 };
|
||||
}
|
||||
|
||||
async getReviews(_owner: string, _repo: string, _prNumber: number): Promise<readonly IGitHubPullRequestReview[]> {
|
||||
return this.nextReviews;
|
||||
async getReviews(_owner: string, _repo: string, _prNumber: number, _etag?: string): Promise<{ data: readonly IGitHubPullRequestReview[] | undefined; statusCode: number; etag?: string }> {
|
||||
return { data: this.nextReviews, statusCode: 200 };
|
||||
}
|
||||
|
||||
async getReviewThreads(_owner: string, _repo: string, _prNumber: number): Promise<IGitHubPullRequestReviewThread[]> {
|
||||
|
||||
Reference in New Issue
Block a user