From c72d5e88d519e7fac72bfc5a6dc498479a79a137 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 12 Dec 2024 09:46:16 -0500 Subject: [PATCH] Addressing PR comments. --- api_tests/src/post.spec.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/api_tests/src/post.spec.ts b/api_tests/src/post.spec.ts index 37381d302..52f86e8ef 100644 --- a/api_tests/src/post.spec.ts +++ b/api_tests/src/post.spec.ts @@ -698,7 +698,7 @@ test("Report a post", async () => { () => listReports(beta).then(p => p.reports.find(r => { - return checkReportName(r, gammaReport); + return checkPostReportName(r, gammaReport); }), ), res => !!res, @@ -718,15 +718,7 @@ test("Report a post", async () => { () => listReports(alpha).then(p => p.reports.find(r => { - switch (r.type_) { - case "Post": - return ( - r.post_report.original_post_name === - gammaReport.original_post_name - ); - default: - return false; - } + return checkPostReportName(r, gammaReport); }), ), res => !!res, @@ -833,7 +825,7 @@ test("Rewrite markdown links", async () => { ); }); -function checkReportName(rcv: ReportCombinedView, report: PostReport) { +function checkPostReportName(rcv: ReportCombinedView, report: PostReport) { switch (rcv.type_) { case "Post": return rcv.post_report.original_post_name === report.original_post_name;