feat(lib): add CryptoModule support for Chat SDK (#154) #659
GitHub Actions / Test results
failed
Dec 5, 2023 in 0s
Test results ❌
❌ lib/junit.xml
74 tests were completed in 139s with 71 passed, 1 failed and 2 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
Channel test | 8✅ | 271ms | ||
Channel test | 40✅ | 1❌ | 1⚪ | 139s |
MessageDraft | 11✅ | 20s | ||
Typing indicator test | 3✅ | 1⚪ | 20s | |
User test | 9✅ | 11s |
✅ Channel test
Channel test should convert unix timestamp to PubNub timetoken
✅ Channel test should convert unix timestamp to PubNub timetoken
Channel test should throw an error if the passed value for unix timestamp is not a number
✅ Channel test should throw an error if the passed value for unix timestamp is not a number
Channel test should convert PubNub timetoken to unix timestamp
✅ Channel test should convert PubNub timetoken to unix timestamp
Channel test should throw an error if the passed value for PN timetoken is not a number
✅ Channel test should throw an error if the passed value for PN timetoken is not a number
✅ Channel test should throw an error if the passed value for PN timetoken is not a number
Channel test should convert PubNub timetoken to a Date object
✅ Channel test should convert PubNub timetoken to a Date object
Channel test should convert a Date object to PubNub timetoken
✅ Channel test should convert a Date object to PubNub timetoken
Channel test should throw an error if the passed value for Date is not a Date
✅ Channel test should throw an error if the passed value for Date is not a Date
❌ Channel test
Channel test should create a channel
✅ Channel test should create a channel
Channel test Should be able to delete channel
✅ Channel test Should be able to delete channel
Channel test should get channel history
✅ Channel test should get channel history
Channel test should get channel history with pagination
✅ Channel test should get channel history with pagination
Channel test should fail when trying to send a message to a non-existent channel
✅ Channel test should fail when trying to send a message to a non-existent channel
Channel test should fail when trying to send a message to a deleted channel
✅ Channel test should fail when trying to send a message to a deleted channel
Channel test should fail when trying to get history of a deleted channel
✅ Channel test should fail when trying to get history of a deleted channel
Channel test should edit membership metadata
✅ Channel test should edit membership metadata
Channel test should create a direct, group and public chats with a predefined ID
✅ Channel test should create a direct, group and public chats with a predefined ID
Channel test should create a direct, group and public chats with default IDs
✅ Channel test should create a direct, group and public chats with default IDs
Channel test should create direct conversation and send message
✅ Channel test should create direct conversation and send message
Channel test should create group conversation
✅ Channel test should create group conversation
Channel test should create a thread
✅ Channel test should create a thread
Channel test should not be able to create an empty Thread without any message
✅ Channel test should not be able to create an empty Thread without any message
Channel test should stream channel updates and invoke the callback
✅ Channel test should stream channel updates and invoke the callback
Channel test should stream membership updates and invoke the callback
✅ Channel test should stream membership updates and invoke the callback
Channel test should get unread messages count
✅ Channel test should get unread messages count
Channel test should mention users in a message and validate mentioned users
✅ Channel test should mention users in a message and validate mentioned users
Channel test should mention users with multi-word names in a message and validate mentioned users
✅ Channel test should mention users with multi-word names in a message and validate mentioned users
Channel test should send a message with words that start with @ but are not user mentions
✅ Channel test should send a message with words that start with @ but are not user mentions
Channel test should try to mention users with incorrect usernames and validate no users are mentioned
✅ Channel test should try to mention users with incorrect usernames and validate no users are mentioned
Channel test should suggest global users who are not members of the channel
✅ Channel test should suggest global users who are not members of the channel
Channel test should mention the same user multiple times in a message and validate mentioned users
✅ Channel test should mention the same user multiple times in a message and validate mentioned users
Channel test should correctly add and remove mentioned user
✅ Channel test should correctly add and remove mentioned user
Channel test should correctly add and remove the middle mentioned user
✅ Channel test should correctly add and remove the middle mentioned user
Channel test should mention user in a message and validate cache
⚪ Channel test should mention user in a message and validate cache
Channel test should add and remove a quote
✅ Channel test should add and remove a quote
Channel test should throw an error when trying to quote a message from another channel
✅ Channel test should throw an error when trying to quote a message from another channel
Channel test should quote multiple messages
✅ Channel test should quote multiple messages
Channel test should correctly stream read receipts
✅ Channel test should correctly stream read receipts
Channel test should invite a user to the channel
✅ Channel test should invite a user to the channel
Channel test should invite multiple users to the channel
❌ Channel test should invite multiple users to the channel
Error: expect(received).toEqual(expected) // deep equality
Channel test should verify if user is a member of a channel
✅ Channel test should verify if user is a member of a channel
Channel test should verify if user is online on a channel
✅ Channel test should verify if user is online on a channel
Channel test should verify all user-related mentions using getCurrentUserMentions()
✅ Channel test should verify all user-related mentions using getCurrentUserMentions()
Channel test Should fail when trying to edit membership metadata of a non-existent channel
✅ Channel test Should fail when trying to edit membership metadata of a non-existent channel
Channel test Should create direct conversation, edit, and delete a message
✅ Channel test Should create direct conversation, edit, and delete a message
Channel test should create, reply to, and delete a thread
✅ Channel test should create, reply to, and delete a thread
Channel test should create, reply to, delete a thread, and recreate the deleted thread
✅ Channel test should create, reply to, delete a thread, and recreate the deleted thread
Channel test Should mention users with special characters in their names and validate mentioned users
✅ Channel test Should mention users with special characters in their names and validate mentioned users
Channel test should create a group chat channel
✅ Channel test should create a group chat channel
Channel test should create a public chat channel
✅ Channel test should create a public chat channel
✅ MessageDraft
MessageDraft should mention 2 users
✅ MessageDraft should mention 2 users
MessageDraft should mention 2 - 3 users next to each other
✅ MessageDraft should mention 2 - 3 users next to each other
MessageDraft should mention 2 - 3 users with words between second and third
✅ MessageDraft should mention 2 - 3 users with words between second and third
MessageDraft should reference 2 channels
✅ MessageDraft should reference 2 channels
MessageDraft should reference 2 channels and 2 mentions
✅ MessageDraft should reference 2 channels and 2 mentions
MessageDraft should reference 2 channels and 2 mentions with commas
✅ MessageDraft should reference 2 channels and 2 mentions with commas
MessageDraft should reference 2 channels and 2 mentions with commas - another variation
✅ MessageDraft should reference 2 channels and 2 mentions with commas - another variation
MessageDraft should add 2 text links and 2 plain links
✅ MessageDraft should add 2 text links and 2 plain links
MessageDraft should mix every type of message part
✅ MessageDraft should mix every type of message part
MessageDraft should mix every type of message part - variant 2
✅ MessageDraft should mix every type of message part - variant 2
MessageDraft should reference 3 channels and 3 mentions with no order
✅ MessageDraft should reference 3 channels and 3 mentions with no order
✅ Typing indicator test
Typing indicator test should call the callback with the typing value when a typing signal is received
✅ Typing indicator test should call the callback with the typing value when a typing signal is received
Typing indicator test should not call the callback when the typing signal is from the same user as the recipient
⚪ Typing indicator test should not call the callback when the typing signal is from the same user as the recipient
Typing indicator test should handle multiple users starting and stopping typing
✅ Typing indicator test should handle multiple users starting and stopping typing
Typing indicator test should properly handle typing and stopping typing
✅ Typing indicator test should properly handle typing and stopping typing
✅ User test
User test Should automatically create chat user while initializing
✅ User test Should automatically create chat user while initializing
User test Should be able to create and fetch user
✅ User test Should be able to create and fetch user
User test Should be able to update user
✅ User test Should be able to update user
User test Should be able to delete user
✅ User test Should be able to delete user
User test Should stream user updates and invoke the callback
✅ User test Should stream user updates and invoke the callback
User test should report a user
✅ User test should report a user
User test Should be able to create, fetch, and validate multiple users
✅ User test Should be able to create, fetch, and validate multiple users
User test Should fail to update a non-existent user
✅ User test Should fail to update a non-existent user
User test Should fail to delete a non-existent user
✅ User test Should fail to delete a non-existent user
Annotations
Check failure on line 789 in lib/tests/channel.test.ts
github-actions / Test results
Channel test ► Channel test should invite multiple users to the channel ► Channel test should invite multiple users to the channel
Failed test found in:
lib/junit.xml
Error:
Error: expect(received).toEqual(expected) // deep equality
Raw output
Error: expect(received).toEqual(expected) // deep equality
Expected: "user_lXzF0DYt"
Received: "user_3GuRq0r6"
at toEqual (/home/runner/work/js-chat/js-chat/lib/tests/channel.test.ts:789:34)
at Array.forEach (<anonymous>)
at Object.forEach (/home/runner/work/js-chat/js-chat/lib/tests/channel.test.ts:787:24)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Loading