Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Aug 27, 2024
1 parent b704d0f commit 9f1af45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import mockUsers from "./__mocks__/mock-users";
import { botAssignmentComment, getIssueHtmlUrl, getIssueUrl, noAssignmentCommentFor, STRINGS, updatingRemindersFor } from "./__mocks__/strings";
import { createComment, createIssue, createRepo, ONE_DAY } from "./__mocks__/helpers";
import { collectLinkedPullRequests } from "../src/handlers/collect-linked-pulls";
import { createStructuredMetadata } from "../src/helpers/structured-metadata";

dotenv.config();
const octokit = jest.requireActual("@octokit/rest");
Expand Down Expand Up @@ -119,7 +120,9 @@ describe("User start/stop", () => {
expect(updatedIssue?.assignees).toEqual([{ login: STRINGS.USER, id: 2 }]);

const comments = db.issueComments.getAll();
expect(comments[comments.length - 1].body).toEqual(JSON.stringify({ body: `@${STRINGS.USER}, this task has been idle for a while. Please provide an update.` }));
const latestComment = comments[comments.length - 1];
const partialComment = "@user2, this task has been idle for a while. Please provide an update.\\n\\n\\n<!-- Ubiquity - Followup -"
expect(latestComment.body).toContain(partialComment);
});

it("Should have nothing do within the warning period", async () => {
Expand Down

0 comments on commit 9f1af45

Please sign in to comment.