diff --git a/__tests__/utils/QueryProcessor.test.ts b/__tests__/utils/QueryProcessor.test.ts index 2e886ef7..e3f9226f 100644 --- a/__tests__/utils/QueryProcessor.test.ts +++ b/__tests__/utils/QueryProcessor.test.ts @@ -22,7 +22,13 @@ describe("QueryProcessor", () => { const query = "What is your name?"; const response: string = QueryProcessor(query); expect(response).toBe(( - "Rohan" + "jerryc2" )); - }) + }); + + test('should return Andrew ID', () => { + const query = "What is your Andrew ID?"; + const response: string = QueryProcessor(query); + expect(response).toBe("jerryc2"); + }); }); \ No newline at end of file diff --git a/utils/QueryProcessor.tsx b/utils/QueryProcessor.tsx index 0f6cbc6b..bf59dc56 100644 --- a/utils/QueryProcessor.tsx +++ b/utils/QueryProcessor.tsx @@ -7,9 +7,12 @@ export default function QueryProcessor(query: string): string { ); } - if (query.toLowerCase().includes("name")) { - return "Rohan"; + if (query.toLowerCase().includes("andrew id")) { + return "jerryc2"; } + if (query.toLowerCase().includes("name")) { + return "jerryc2"; + } return ""; }