diff --git a/jest.config.js b/jest.config.js index 8cebf724..057a2c60 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,8 +16,8 @@ module.exports = { coverageThreshold: { global: { branches: 55, - functions: 70, - lines: 75, + functions: 75, + lines: 80, statements: 75, }, }, diff --git a/src/bot/__tests__/requestReview.test.ts b/src/bot/__tests__/requestReview.test.ts index af02e03b..bb2933bb 100644 --- a/src/bot/__tests__/requestReview.test.ts +++ b/src/bot/__tests__/requestReview.test.ts @@ -350,7 +350,7 @@ describe('requestReview', () => { expect(param.ack).toBeCalled(); }); - it.skip('should post a message to the interviewing channel', async () => { + it('should post a message to the interviewing channel', async () => { const { param } = await callCallback(); expect(param.client.chat.postMessage).toBeCalledWith({ diff --git a/src/bot/requestReview.ts b/src/bot/requestReview.ts index 5de0b83f..9566fbb2 100644 --- a/src/bot/requestReview.ts +++ b/src/bot/requestReview.ts @@ -6,7 +6,7 @@ import { QueueService } from '@services'; import { App, Block, KnownBlock, PlainTextOption, View } from '@slack/bolt'; import { blockUtils } from '@utils/blocks'; import log from '@utils/log'; -import { bold, codeBlock, compose, italic, mention, ul, link } from '@utils/text'; +import { bold, codeBlock, compose, italic, mention, ul } from '@utils/text'; import { PendingReviewer } from '@models/ActiveReview'; import { ActionId, Deadline, DeadlineLabel, Interaction } from './enums'; import { chatService } from '@/services/ChatService'; @@ -216,7 +216,6 @@ export const requestReview = { )} has requested ${numberOfReviewersValue} reviews for a HackerRank done in the following languages:`, ul(...languages), bold(`The review is needed by end of day ${deadlineDisplay}`), - link('AI-Powered Plagiarism Review', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'), candidateIdentifierValue ? italic(`Candidate Identifier: ${candidateIdentifierValue}`) : '', ), ); diff --git a/src/services/__tests__/ChatService.test.ts b/src/services/__tests__/ChatService.test.ts index f2478ff5..5ded7e74 100644 --- a/src/services/__tests__/ChatService.test.ts +++ b/src/services/__tests__/ChatService.test.ts @@ -57,7 +57,7 @@ describe('ChatService', () => { }); }); - describe.skip('sendRequestReviewMessage', () => { + describe('sendRequestReviewMessage', () => { it('should notify the given user that a request is ready for them to review', async () => { const client = buildMockWebClient(); client.chat.postMessage = jest.fn().mockResolvedValue({ diff --git a/src/utils/RequestBuilder.ts b/src/utils/RequestBuilder.ts index 2d262346..9477b431 100644 --- a/src/utils/RequestBuilder.ts +++ b/src/utils/RequestBuilder.ts @@ -1,5 +1,5 @@ import { ActionId, BlockId } from '@bot/enums'; -import { bold, compose, link, mention, ul } from '@utils/text'; +import { bold, compose, mention, ul } from '@utils/text'; import { ActionsBlock, Block } from '@slack/bolt'; import { SectionBlock } from '@slack/types'; @@ -47,7 +47,6 @@ export const requestBuilder = { )} has requested a HackerRank review done in the following languages:`, ul(...languages), bold(`The review is needed by end of day ${deadlineDisplay}`), - link('AI-Powered Plagiarism Review', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'), ), }, }; diff --git a/src/utils/text.ts b/src/utils/text.ts index 7b2daa37..0157f9f8 100644 --- a/src/utils/text.ts +++ b/src/utils/text.ts @@ -20,10 +20,6 @@ export function li(...items: string[]): string { return items.map((item, index) => ` ${index + 1}. ${item}`).join('\n'); } -export function link(linkText: string, url: string) { - return `<${url}|${linkText}>`; -} - export function codeBlock(...lines: string[]): string { return ['```', ...lines, '```'].join('\n'); }