Skip to content

TEC-1960: adds unit tests for socket handlers#17

Open
swagnikdutta wants to merge 24 commits intomainfrom
adds-unit-tests
Open

TEC-1960: adds unit tests for socket handlers#17
swagnikdutta wants to merge 24 commits intomainfrom
adds-unit-tests

Conversation

@swagnikdutta
Copy link
Contributor

@swagnikdutta swagnikdutta commented Feb 27, 2026

No description provided.

@swagnikdutta swagnikdutta changed the base branch from main to feat/socket-io-migration February 27, 2026 11:07
@swagnikdutta swagnikdutta force-pushed the adds-unit-tests branch 2 times, most recently from c4e3920 to b2ef239 Compare February 28, 2026 15:24
Base automatically changed from feat/socket-io-migration to main March 2, 2026 10:21
@swagnikdutta swagnikdutta force-pushed the adds-unit-tests branch 4 times, most recently from 997842f to 1d7d7b8 Compare March 4, 2026 13:59
@swagnikdutta swagnikdutta changed the title Adds unit tests adds unit tests for all socket handlers Mar 5, 2026
@swagnikdutta swagnikdutta marked this pull request as ready for review March 5, 2026 14:43
@swagnikdutta swagnikdutta changed the title adds unit tests for all socket handlers TEC-1960: adds unit tests for socket handlers Mar 10, 2026
@swagnikdutta swagnikdutta force-pushed the adds-unit-tests branch 2 times, most recently from 8c37616 to 709a2ba Compare March 10, 2026 11:37
const filterParams = { documentId, sessionDid: socket.data.sessionDid };
const [updates, total] = await Promise.all([
mongodbStore.getUpdatesByDocument(filterParams, { committed: filters.committed }),
mongodbStore.getUpdatesByDocument(filterParams, { offset, limit, sort, committed: filters.committed }),
Copy link
Contributor Author

@swagnikdutta swagnikdutta Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nadeem-fileverse I had to add these option flags in the function call as existing tests were failing.

But I see you had removed these recently here. So I'm assuming there was a reason behind it.

  • I would like to understand the reason. And what is the actionable now?
  • Should we add the pagination back?
  • Or should I update the unit test to satisfy the function call without pagination parameters?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pagination is disabled atm you should adjust your test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Can you share the reasoning behind removing pagination for now?

@swagnikdutta swagnikdutta force-pushed the adds-unit-tests branch 3 times, most recently from 3f957fa to cf75c4c Compare March 18, 2026 08:51
@nadeem-fileverse
Copy link
Contributor

Test files use raw string literals ("NOT_AUTHENTICATED", "SESSION_NOT_FOUND", etc.) instead of the ErrorCode enum.

@nadeem-fileverse
Copy link
Contributor

This looks good so far, but we should also test for session-manager and broadcast-bridge

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.

2 participants