Skip to content

test: add unit tests for SocketInstance and ChatE2EE class#452

Open
yashcreator11 wants to merge 4 commits into
muke1908:masterfrom
yashcreator11:test/socket-instance-and-chate2ee
Open

test: add unit tests for SocketInstance and ChatE2EE class#452
yashcreator11 wants to merge 4 commits into
muke1908:masterfrom
yashcreator11:test/socket-instance-and-chate2ee

Conversation

@yashcreator11
Copy link
Copy Markdown
Contributor

What does this PR do?

Adds unit tests for two open issues:

Changes

  • service/src/socket/socket.test.ts — 15 tests covering constructor,
    joinChat, dispose, all 6 event listeners, chat-message ack ordering,
    and lazy subscription context
  • service/src/sdk.test.ts — 29 tests covering init, key generation,
    setChannel, isEncrypted, on, sendMessage, encrypt, getUsersInChannel,
    delete, dispose, and method guards before init
  • jest.config.js — exclude e2e/ from Jest to fix Playwright conflict

Test results

Test Suites: 6 passed, 6 total
Tests: 75 passed, 75 total

All tests pass with no failures.

yashkhandagale-dotcom and others added 4 commits May 19, 2026 10:47
- Add socket.test.ts covering all event routing, joinChat, dispose,
  chat-message delivery+ack, and lazy subscription context (muke1908#311)
- Add sdk.test.ts covering init, setChannel, encrypt, sendMessage,
  dispose, guards, and isEncrypted for ChatE2EE class (muke1908#319)
- Fix jest.config.js to exclude e2e/ from Jest runs (Playwright conflict)

Closes muke1908#311
Closes muke1908#319
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write UT for ChatE2EE class Write UT for SocketInstance in chat-e2ee/service module

2 participants