Skip to content

Commit

Permalink
Test operation fields in chat history
Browse files Browse the repository at this point in the history
  • Loading branch information
vladvelici committed Dec 4, 2024
1 parent 9de6a77 commit 11dc56a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/core/messages.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ describe('messages integration', { timeout: 10000 }, () => {
expect(history.items[0]?.isUpdated).toBe(false);
expect(history.items[0]?.isDeleted).toBe(true);
expect(history.items[0]?.deletedAt).toEqual(deletedMessage1.deletedAt);
// todo: uncomment when operation is returned correctly in history endpoint
// expect(history.items[0]?.deletedBy).toEqual(deletedMessage1.deletedBy);
expect(history.items[0]?.deletedBy).toEqual(deletedMessage1.deletedBy);
expect(history.items[0]?.operation?.description).toEqual('Deleted message');

// We shouldn't have a "next" link in the response
expect(history.hasNext()).toBe(false);
Expand Down Expand Up @@ -325,8 +325,8 @@ describe('messages integration', { timeout: 10000 }, () => {
expect(history.items[0]?.isUpdated).toBe(true);
expect(history.items[0]?.isDeleted).toBe(false);
expect(history.items[0]?.updatedAt).toEqual(updatedMessage1.updatedAt);
// todo: uncomment when operation is returned correctly in history endpoint
// expect(history.items[0]?.updatedBy).toEqual(updatedMessage1.updatedBy);
expect(history.items[0]?.updatedBy).toEqual(updatedMessage1.updatedBy);
expect(history.items[0]?.operation?.description).toEqual('updated message');

// We shouldn't have a "next" link in the response
expect(history.hasNext()).toBe(false);
Expand Down

0 comments on commit 11dc56a

Please sign in to comment.