Skip to content

Commit

Permalink
Merge pull request #428 from ably/integration-test-history-operation
Browse files Browse the repository at this point in the history
Test operation fields in chat history
  • Loading branch information
vladvelici authored Dec 4, 2024
2 parents 9de6a77 + 11dc56a commit 6a4f924
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 6a4f924

Please sign in to comment.