diff --git a/__tests__/utils/QueryProcessor.test.ts b/__tests__/utils/QueryProcessor.test.ts index 218834c4..54ac498b 100644 --- a/__tests__/utils/QueryProcessor.test.ts +++ b/__tests__/utils/QueryProcessor.test.ts @@ -17,4 +17,11 @@ describe("QueryProcessor", () => { "writer in the English language and the world's pre-eminent dramatist." )); }); + test('should return andrew id description', () => { + const query = "What is your Andrew ID?"; + const response: string = QueryProcessor(query); + expect(response).toBe(( + "mannan" + )); + }); }); \ No newline at end of file diff --git a/utils/QueryProcessor.tsx b/utils/QueryProcessor.tsx index 857767f9..39fda49a 100644 --- a/utils/QueryProcessor.tsx +++ b/utils/QueryProcessor.tsx @@ -5,6 +5,13 @@ export default function QueryProcessor(query: string): string { "English poet, playwright, and actor, widely regarded as the greatest " + "writer in the English language and the world's pre-eminent dramatist." ); + + } + if (query.toLowerCase().includes("andrew")) { + return ( + "mannan" + ); + } return "";