Skip to content

Commit

Permalink
refactor: change taske update message
Browse files Browse the repository at this point in the history
  • Loading branch information
tejaskh3 committed Apr 25, 2024
1 parent 86565c8 commit ba7c978
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/utils/sendTaskUpdates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function sendTaskUpdate(
): Promise<void> {
const taskUrl = config(env).RDS_STATUS_SITE_URL + `/tasks/${taskId}`;
const formattedString =
`${userName} added an update to his task: <${taskUrl}>\n` +
`${userName} added an update to the task: <${taskUrl}>\n` +
`**Completed**\n${completed}\n\n` +
`**Planned**\n${planned}\n\n` +
`**Blockers**\n${blockers}`;
Expand Down
14 changes: 7 additions & 7 deletions tests/unit/utils/sendTasksUpdates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe("sendTaskUpdate function", () => {
test("should send the task update to discord tracking channel when all fields are present", async () => {
const url = config(mockEnv).TRACKING_CHANNEL_URL;
const formattedString =
`${userName} added an update to his task: <${taskUrl}>\n` +
`${userName} added an update to the task: <${taskUrl}>\n` +
`**Completed**\n${completed}\n\n` +
`**Planned**\n${planned}\n\n` +
`**Blockers**\n${blockers}`;
Expand All @@ -55,7 +55,7 @@ describe("sendTaskUpdate function", () => {
test("should send the task update to discord tracking channel when only completed is present", async () => {
const url = config(mockEnv).TRACKING_CHANNEL_URL;
const formattedString =
`${userName} added an update to his task: <${taskUrl}>\n` +
`${userName} added an update to the task: <${taskUrl}>\n` +
`**Completed**\n${completed}\n\n` +
`**Planned**\n\n\n` +
`**Blockers**\n`;
Expand All @@ -75,7 +75,7 @@ describe("sendTaskUpdate function", () => {
test("should send the task update to discord tracking channel when only planned is present", async () => {
const url = config(mockEnv).TRACKING_CHANNEL_URL;
const formattedString =
`${userName} added an update to his task: <${taskUrl}>\n` +
`${userName} added an update to the task: <${taskUrl}>\n` +
`**Completed**\n\n\n` +
`**Planned**\n${planned}\n\n` +
`**Blockers**\n`;
Expand All @@ -95,7 +95,7 @@ describe("sendTaskUpdate function", () => {
test("should send the task update to discord tracking channel when only blockers is present", async () => {
const url = config(mockEnv).TRACKING_CHANNEL_URL;
const formattedString =
`${userName} added an update to his task: <${taskUrl}>\n` +
`${userName} added an update to the task: <${taskUrl}>\n` +
`**Completed**\n\n\n` +
`**Planned**\n\n\n` +
`**Blockers**\n${blockers}`;
Expand All @@ -115,7 +115,7 @@ describe("sendTaskUpdate function", () => {
test("should send the task update to discord tracking channel when only completed and planned are present", async () => {
const url = config(mockEnv).TRACKING_CHANNEL_URL;
const formattedString =
`${userName} added an update to his task: <${taskUrl}>\n` +
`${userName} added an update to the task: <${taskUrl}>\n` +
`**Completed**\n${completed}\n\n` +
`**Planned**\n${planned}\n\n` +
`**Blockers**\n`;
Expand All @@ -135,7 +135,7 @@ describe("sendTaskUpdate function", () => {
test("should send the task update to discord tracking channel when only completed and blockers are present", async () => {
const url = config(mockEnv).TRACKING_CHANNEL_URL;
const formattedString =
`${userName} added an update to his task: <${taskUrl}>\n` +
`${userName} added an update to the task: <${taskUrl}>\n` +
`**Completed**\n${completed}\n\n` +
`**Planned**\n\n\n` +
`**Blockers**\n${blockers}`;
Expand All @@ -155,7 +155,7 @@ describe("sendTaskUpdate function", () => {
test("should send the task update to discord tracking channel when only planned and blockers are present", async () => {
const url = config(mockEnv).TRACKING_CHANNEL_URL;
const formattedString =
`${userName} added an update to his task: <${taskUrl}>\n` +
`${userName} added an update to the task: <${taskUrl}>\n` +
`**Completed**\n\n\n` +
`**Planned**\n${planned}\n\n` +
`**Blockers**\n${blockers}`;
Expand Down

0 comments on commit ba7c978

Please sign in to comment.