Skip to content

Refactor message docs for deletions. #1834

Refactor message docs for deletions.

Refactor message docs for deletions. #1834

Triggered via pull request December 2, 2024 12:04
Status Failure
Total duration 2m 32s
Artifacts

dev.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
test/core/chat.integration.test.ts > Chat > should work using msgpack: test/core/chat.integration.test.ts#L83
AssertionError: expected [] to deeply equal ArrayContaining{…} - Expected + Received - ArrayContaining [ - ObjectContaining { - "clientId": "ably-chat-js-client-1u4o7", - "text": "my message", - }, - ] + Array [] ❯ test/core/chat.integration.test.ts:83:27
test/core/messages.integration.test.ts > messages integration > should be able to delete and receive deletion messages: test/core/messages.integration.test.ts#L132
AssertionError: expected [ DefaultMessage{ …(12) } ] to deeply equal [ ObjectContaining{…} ] - Expected + Received Array [ - ObjectContaining { + DefaultMessage { "clientId": "ably-chat-js-client-cy2na", - "deletedAt": undefined, - "deletedBy": "ably-chat-js-client-cy2na", + "createdAt": 2024-12-02T12:05:51.505Z, + "deletedAt": 2024-12-02T12:05:51.580Z, + "headers": Object {}, "latestAction": "message.delete", - "latestActionSerial": undefined, + "latestActionDetails": Object { + "clientId": "ably-chat-js-client-cy2na", + "description": "Deleted message", + "metadata": Object { + "key": "value", + }, + }, + "latestActionSerial": "01733141151580-000@e7doLl09QBjCtk54456642:000", + "metadata": Object {}, + "roomId": "ably-chat-js-room-v14sgp", "serial": "01733141151505-000@e7doLl09QBjCtk54456642:000", "text": "Hello there!", + "updatedAt": undefined, }, ] ❯ test/core/messages.integration.test.ts:132:23
test/core/messages.integration.test.ts > messages integration > should be able to update and receive update messages: test/core/messages.integration.test.ts#L196
AssertionError: expected [ DefaultMessage{ …(12) } ] to deeply equal [ ObjectContaining{…} ] - Expected + Received Array [ - ObjectContaining { + DefaultMessage { "clientId": "ably-chat-js-client-fi22qr", "createdAt": 2024-12-02T12:05:52.432Z, + "deletedAt": undefined, + "headers": Object {}, "latestAction": "message.update", - "latestActionSerial": undefined, + "latestActionDetails": Object { + "clientId": "ably-chat-js-client-fi22qr", + }, + "latestActionSerial": "01733141152500-000@e7dnR-JpABjCs877983815:000", + "metadata": Object {}, + "roomId": "ably-chat-js-room-g20otc", "serial": "01733141152432-000@e7dnR-JpABjCs877983815:000", "text": "bananas", "updatedAt": 2024-12-02T12:05:52.500Z, - "updatedBy": "ably-chat-js-client-fi22qr", }, ] ❯ test/core/messages.integration.test.ts:196:21
test/core/messages.integration.test.ts > messages integration > should be able to paginate chat history: test/core/messages.integration.test.ts#L323
AssertionError: expected [] to deeply equal [ ObjectContaining{…}, …(2) ] - Expected + Received - Array [ - ObjectContaining { - "clientId": "ably-chat-js-client-amd4dl", - "serial": "01733141153869-000@e7dZB5SJABjCs992776200:000", - "text": "Hello there!", - }, - ObjectContaining { - "clientId": "ably-chat-js-client-amd4dl", - "serial": "01733141153939-000@e7dZB5SJABjCs992776200:000", - "text": "I have the high ground!", - }, - ObjectContaining { - "clientId": "ably-chat-js-client-amd4dl", - "serial": "01733141154022-000@e7dZB5SJABjCs992776200:000", - "text": "You underestimate my power!", - }, - ] + Array [] ❯ test/core/messages.integration.test.ts:323:28
test/core/messages.integration.test.ts > messages integration > should be able to paginate chat history (msgpack): test/core/messages.integration.test.ts#L452
AssertionError: expected [ DefaultMessage{ …(12) } ] to deeply equal [ ObjectContaining{…} ] - Expected + Received Array [ - ObjectContaining { + DefaultMessage { "clientId": "ably-chat-js-client-mb3ddq", - "serial": "01733141154726-000@e7doLl09QBjCtk73919481:000", - "text": "Don't try it!", + "createdAt": 2024-12-02T12:05:54.342Z, + "deletedAt": undefined, + "headers": Object {}, + "latestAction": undefined, + "latestActionDetails": undefined, + "latestActionSerial": undefined, + "metadata": Object {}, + "roomId": "ably-chat-js-room-fkimcr", + "serial": "01733141154342-000@e7doLl09QBjCtk73919481:000", + "text": "Hello there!", + "updatedAt": undefined, }, ] ❯ test/core/messages.integration.test.ts:452:29
test/core/messages.integration.test.ts > messages integration > should be able to get history for listener from attached serial: test/core/messages.integration.test.ts#L594
AssertionError: expected [ DefaultMessage{ …(12) } ] to deeply equal [ ObjectContaining{…}, …(1) ] - Expected + Received Array [ ObjectContaining { "clientId": "ably-chat-js-client-dfx8v6", "serial": "01733141157733-000@e7dyAo9JQBjCrE64257689:000", "text": "I have the high ground!", }, - ObjectContaining { - "clientId": "ably-chat-js-client-dfx8v6", - "serial": "01733141157661-000@e7dyAo9JQBjCrE64257689:000", - "text": "Hello there!", - }, ] ❯ test/core/messages.integration.test.ts:594:43
test/core/messages.integration.test.ts > messages integration > should be able to get history for listener with latest message serial: test/core/messages.integration.test.ts#L655
AssertionError: expected [] to deeply equal [ ObjectContaining{…}, …(1) ] - Expected + Received - Array [ - ObjectContaining { - "clientId": "ably-chat-js-client-wkkqe", - "serial": "01733141159769-000@e7d-AgH_gBjCoT85367237:000", - "text": "I have the high ground!", - }, - ObjectContaining { - "clientId": "ably-chat-js-client-wkkqe", - "serial": "01733141159701-000@e7d-AgH_gBjCoT85367237:000", - "text": "Hello there!", - }, - ] + Array [] ❯ test/core/messages.integration.test.ts:655:43
test/core/messages.integration.test.ts > messages integration > should be able to get history for multiple listeners: test/core/messages.integration.test.ts#L691
AssertionError: expected [] to deeply equal [ DefaultMessage{ …(12) } ] - Expected + Received - Array [ - DefaultMessage { - "clientId": "ably-chat-js-client-mx6eqp", - "createdAt": 2024-12-02T12:06:00.717Z, - "deletedAt": undefined, - "headers": Object {}, - "latestAction": undefined, - "latestActionDetails": undefined, - "latestActionSerial": undefined, - "metadata": Object {}, - "roomId": "ably-chat-js-room-awu2qw", - "serial": "01733141160717-000@e7doLl09QBjCtk59198720:000", - "text": "You underestimate my power!", - "updatedAt": undefined, - }, - ] + Array [] ❯ test/core/messages.integration.test.ts:691:43
test/react/hooks/use-messages.integration.test.tsx > useMessages > should reset getPreviousMessages if the listener becomes undefined then redefined: test/react/hooks/use-messages.integration.test.tsx#L435
AssertionError: expected +0 to be 3 // Object.is equality - Expected + Received - 3 + 0 ❯ test/react/hooks/use-messages.integration.test.tsx:435:35
test/react/hooks/use-messages.integration.test.tsx > useMessages > should persist the getPreviousMessages subscription point across renders, if listener remains defined: test/react/hooks/use-messages.integration.test.tsx#L527
AssertionError: expected +0 to be 3 // Object.is equality - Expected + Received - 3 + 0 ❯ test/react/hooks/use-messages.integration.test.tsx:527:34