diff --git a/example/src/tests/groupTests.ts b/example/src/tests/groupTests.ts index 26ae6f53f..07d38cd4f 100644 --- a/example/src/tests/groupTests.ts +++ b/example/src/tests/groupTests.ts @@ -220,15 +220,6 @@ test('group message delivery status', async () => { `the messages length should be 2 but was ${alixMessages.length}` ) - if (alixMessages[0].content() !== 'hello, world') { - throw new Error("newest message should be 'hello, world'") - } - - assert( - alixMessages[0].deliveryStatus === 'UNPUBLISHED', - `the message should have a delivery status of ${MessageDeliveryStatus.UNPUBLISHED} but was ${alixMessages[0].deliveryStatus}` - ) - const alexMessagesFiltered: DecodedMessage[] = await alixGroup.messages( true, { @@ -243,6 +234,11 @@ test('group message delivery status', async () => { const alixMessages2: DecodedMessage[] = await alixGroup.messages(false) + assert( + alixMessages2.length === 2, + `the messages length should be 2 but was ${alixMessages.length}` + ) + assert( alixMessages2[0].deliveryStatus === 'PUBLISHED', `the message should have a delivery status of PUBLISHED but was ${alixMessages2[0].deliveryStatus}`