Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Jul 23, 2024
1 parent f724b85 commit 053856e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/handlers/add-comment.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Context } from "../types/context";


export async function addCommentToIssue(context: Context, message: string) {
const { payload } = context;
const issueNumber = payload.issue.number;
Expand Down
3 changes: 2 additions & 1 deletion tests/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ describe("Ask plugin tests", () => {
ctx.config.openAi_apiKey = "";
await plugin(ctx);

expect(errorSpy).toHaveBeenCalledWith("No OpenAI API Key provided");
expect(errorSpy).toHaveBeenNthCalledWith(1, "No OpenAI API Key detected!");
expect(errorSpy).toHaveBeenNthCalledWith(2, "No response from OpenAI");
});

it("should construct the chat history correctly", async () => {
Expand Down

0 comments on commit 053856e

Please sign in to comment.