fix(lib): save some time on testing #734
GitHub Actions / Test results
failed
Jun 18, 2024 in 1s
112 passed, 1 failed and 2 skipped
❌ lib/junit.xml
115 tests were completed in 186s with 112 passed, 1 failed and 2 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
Channel test | 45✅ | 1⚪ | 42s | |
MessageDraft | 11✅ | 5s | ||
Send message test | 45✅ | 1⚪ | 95s | |
User test | 11✅ | 1❌ | 43s |
✅ 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
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
Channel test should set (or lift) restrictions on a user
✅ Channel test should set (or lift) restrictions on a user
Channel test Should get the number of unread messages on channels
✅ Channel test Should get the number of unread messages on channels
Channel test should set 'eTag' and 'updated' on the Membership object
✅ Channel test should set 'eTag' and 'updated' on the Membership object
Channel test should set 'eTag' and 'updated' on the Membership object in real time
✅ Channel test should set 'eTag' and 'updated' on the Membership object in real time
✅ 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
✅ Send message test
Send message test should send and receive unicode messages correctly
✅ Send message test should send and receive unicode messages correctly
Send message test should send and receive regular text messages correctly
✅ Send message test should send and receive regular text messages correctly
Send message test should delete the message
✅ Send message test should delete the message
Send message test should restore a soft deleted message
✅ Send message test should restore a soft deleted message
Send message test should restore a soft deleted message together with its thread
✅ Send message test should restore a soft deleted message together with its thread
Send message test should only log a warning if you try to restore an undeleted message
✅ Send message test should only log a warning if you try to restore an undeleted message
Send message test should throw an error if you try to create a thread on a deleted message
✅ Send message test should throw an error if you try to create a thread on a deleted message
Send message test should edit the message
✅ Send message test should edit the message
Send message test should toggle the message reaction
✅ Send message test should toggle the message reaction
Send message test should pin the message
✅ Send message test should pin the message
Send message test should unpin the message
✅ Send message test should unpin the message
Send message test should stream message updates and invoke the callback
✅ Send message test should stream message updates and invoke the callback
Send message test should render URLs correctly
✅ Send message test should render URLs correctly
Send message test should add linked text correctly
✅ Send message test should add linked text correctly
Send message test should throw an error for invalid link format
✅ Send message test should throw an error for invalid link format
Send message test should throw an error if adding a link inside another link
✅ Send message test should throw an error if adding a link inside another link
Send message test should remove a linked URL correctly
✅ Send message test should remove a linked URL correctly
Send message test should report a message
✅ Send message test should report a message
Send message test should send multiple image files along with a text message correctly
✅ Send message test should send multiple image files along with a text message correctly
Send message test should send image file along with a text message correctly
✅ Send message test should send image file along with a text message correctly
Send message test should send pdf file along with a text message correctly
✅ Send message test should send pdf file along with a text message correctly
Send message test should send txt file along with a text message correctly
✅ Send message test should send txt file along with a text message correctly
Send message test should send mp4 file along with a text message correctly
✅ Send message test should send mp4 file along with a text message correctly
Send message test should send multiple different types of files along with a text message correctly
✅ Send message test should send multiple different types of files along with a text message correctly
Send message test shouldn't allow to send image file over 5 mb along with a text message
⚪ Send message test shouldn't allow to send image file over 5 mb along with a text message
Send message test should send 3 messages with proper delays and verify rate limiter
✅ Send message test should send 3 messages with proper delays and verify rate limiter
Send message test should send long messages and validate correct rendering
✅ Send message test should send long messages and validate correct rendering
Send message test should fail to send an empty or whitespace-only message
✅ Send message test should fail to send an empty or whitespace-only message
Send message test should send and receive messages in various languages correctly
✅ Send message test should send and receive messages in various languages correctly
Send message test should toggle the message reaction and then delete the message reaction
✅ Send message test should toggle the message reaction and then delete the message reaction
Send message test should be unable to pin multiple messages
✅ Send message test should be unable to pin multiple messages
Send message test should not allow inserting a link inside another link
✅ Send message test should not allow inserting a link inside another link
Send message test should send quote message in a Thread
✅ Send message test should send quote message in a Thread
Send message test should pin the message inside the Thread
✅ Send message test should pin the message inside the Thread
Send message test should encrypt and decrypt a message
✅ Send message test should encrypt and decrypt a message
Send message test should encrypt and decrypt a file
✅ Send message test should encrypt and decrypt a file
Send message test should still view text messages sent before enabling encryption
✅ Send message test should still view text messages sent before enabling encryption
Send message test should still view files sent before enabling encryption
✅ Send message test should still view files sent before enabling encryption
Send message test should be able to decrypt text and file messages sent using a previous encryption key
✅ Send message test should be able to decrypt text and file messages sent using a previous encryption key
Send message test should send a message with custom body and transform it to TextMessageContent when received
✅ Send message test should send a message with custom body and transform it to TextMessageContent when received
Send message test should send a message with custom body and crash if getMessageResponseBody is incorrect
✅ Send message test should send a message with custom body and crash if getMessageResponseBody is incorrect
Send message test should be able to pass custom edit and delete action names
✅ Send message test should be able to pass custom edit and delete action names
Send message test should work fine even for multiple schemas on different channels
✅ Send message test should work fine even for multiple schemas on different channels
Send message test should be able to read live messages with custom payloads as well
✅ Send message test should be able to read live messages with custom payloads as well
Send message test should be able to read live encrypted messages with custom payloads
✅ Send message test should be able to read live encrypted messages with custom payloads
Send message test should be able to read historic encrypted messages with custom payloads
✅ Send message test should be able to read historic encrypted messages with custom payloads
❌ 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 update the user even if they're a member of a particular channel
✅ User test should update the user even if they're a member of a particular channel
User test should update the user even if they're not a member of a particular channel
❌ User test should update the user even if they're not a member of a particular channel
Error: thrown: "Exceeded timeout of 10000 ms for a test while waiting for `done()` to be called.
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
User test Should apply filter to 'getMemberships'
✅ User test Should apply filter to 'getMemberships'
Annotations
Check failure on line 109 in lib/tests/user.test.ts
github-actions / Test results
User test ► User test should update the user even if they're not a member of a particular channel ► User test should update the user even if they're not a member of a particular channel
Failed test found in:
lib/junit.xml
Error:
Error: thrown: "Exceeded timeout of 10000 ms for a test while waiting for `done()` to be called.
Raw output
Error: thrown: "Exceeded timeout of 10000 ms for a test while waiting for `done()` to be called.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
at test (/home/runner/work/js-chat/js-chat/lib/tests/user.test.ts:109:3)
at _dispatchDescribe (/home/runner/work/js-chat/js-chat/node_modules/jest-circus/build/index.js:91:26)
at describe (/home/runner/work/js-chat/js-chat/node_modules/jest-circus/build/index.js:55:5)
at Object.describe (/home/runner/work/js-chat/js-chat/lib/tests/user.test.ts:5:1)
at Runtime._execModule (/home/runner/work/js-chat/js-chat/node_modules/jest-runtime/build/index.js:1439:24)
at Runtime._loadModule (/home/runner/work/js-chat/js-chat/node_modules/jest-runtime/build/index.js:1022:12)
at Runtime.requireModule (/home/runner/work/js-chat/js-chat/node_modules/jest-runtime/build/index.js:882:12)
at jestAdapter (/home/runner/work/js-chat/js-chat/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)
at runTestInternal (/home/runner/work/js-chat/js-chat/node_modules/jest-runner/build/runTest.js:367:16)
at runTest (/home/runner/work/js-chat/js-chat/node_modules/jest-runner/build/runTest.js:444:34)
Loading