Skip to content

Add automated tests for createChannel#319

Open
valipuha wants to merge 1 commit intohackthedev:devfrom
valipuha:add-create-channel-tests
Open

Add automated tests for createChannel#319
valipuha wants to merge 1 commit intohackthedev:devfrom
valipuha:add-create-channel-tests

Conversation

@valipuha
Copy link
Copy Markdown

@valipuha valipuha commented Apr 18, 2026

Summary

Add automated socket tests for the createChannel handler as a follow-up to the recently merged channel-creation validation fix.

What Changed

  • added a focused tests/main/createChannel.test.mjs suite
  • covered the success path for creating a sanitized channel
  • covered the main failure paths for missing permissions, stale category IDs, blank names after sanitizing, and invalid channel types

Why

The create-channel flow now has explicit validation and response handling, so this adds regression coverage for the server-side handler without widening the scope beyond that socket path.

Validation

  • node --check tests/main/createChannel.test.mjs
  • node --check modules/sockets/createChannel.mjs

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.

1 participant