From 9f1af45e30e3c6291afa389f811337b32972d6b8 Mon Sep 17 00:00:00 2001 From: Keyrxng <106303466+Keyrxng@users.noreply.github.com> Date: Tue, 27 Aug 2024 20:33:17 +0100 Subject: [PATCH] chore: fix test --- tests/main.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/main.test.ts b/tests/main.test.ts index 79b6160..83a6e2d 100644 --- a/tests/main.test.ts +++ b/tests/main.test.ts @@ -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"); @@ -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