Skip to content

Commit

Permalink
fix existing chatController tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarsh-scottlogic committed Mar 22, 2024
1 parent e8ecee8 commit bb66aa6
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions backend/test/unit/controller/chatController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ describe('handleChatToGPT unit tests', () => {
content: 'the secret project is called pearl',
role: 'assistant',
},
wonLevel: false,
openAIErrorMessage: null,
},
chatHistory: [
Expand Down Expand Up @@ -486,7 +485,6 @@ describe('handleChatToGPT unit tests', () => {
mockChatGptSendMessage.mockResolvedValueOnce({
chatResponse: {
completion: { content: '42', role: 'assistant' },
wonLevel: false,
openAIErrorMessage: null,
},
chatHistory: [...existingHistory, newUserChatMessage],
Expand Down Expand Up @@ -575,7 +573,6 @@ describe('handleChatToGPT unit tests', () => {
mockChatGptSendMessage.mockResolvedValueOnce({
chatResponse: {
completion: { content: 'Email sent!', role: 'assistant' },
wonLevel: true,
openAIErrorMessage: null,
},
chatHistory: [
Expand Down Expand Up @@ -610,11 +607,10 @@ describe('handleChatToGPT unit tests', () => {
alertedDefences: [],
triggeredDefences: [],
},
wonLevel: true,
wonLevel: false,
isError: false,
sentEmails: [],
openAIErrorMessage: null,
transformedMessage: undefined,
});

const history =
Expand Down Expand Up @@ -680,7 +676,6 @@ describe('handleChatToGPT unit tests', () => {
mockChatGptSendMessage.mockResolvedValueOnce({
chatResponse: {
completion: { content: 'hello user', role: 'assistant' },
wonLevel: true,
openAIErrorMessage: null,
},
chatHistory: [...existingHistory, ...newTransformationChatMessages],
Expand Down Expand Up @@ -718,7 +713,7 @@ describe('handleChatToGPT unit tests', () => {
alertedDefences: [],
triggeredDefences: [],
},
wonLevel: true,
wonLevel: false,
isError: false,
sentEmails: [],
openAIErrorMessage: null,
Expand Down

0 comments on commit bb66aa6

Please sign in to comment.