Skip to content

test: cover websocket plugin behavior#173

Open
xingxi0614-cpu wants to merge 1 commit into
outerbase:mainfrom
xingxi0614-cpu:test-websocket-plugin-coverage
Open

test: cover websocket plugin behavior#173
xingxi0614-cpu wants to merge 1 commit into
outerbase:mainfrom
xingxi0614-cpu:test-websocket-plugin-coverage

Conversation

@xingxi0614-cpu
Copy link
Copy Markdown

/claim #71

Summary:

  • Added focused Vitest coverage for WebSocketPlugin route registration and configurable prefixes.
  • Covered non-websocket upgrade rejection without creating a WebSocket pair.
  • Covered WebSocket query messages invoking operations.executeQuery with isRaw: false, the active data source, config, SQL, and params.
  • Covered unrelated message actions being ignored and sendMessage delegating to the client socket.

Verification / demo:

  • pnpm vitest --run plugins/websocket/index.test.ts -> 1 file passed, 6 tests passed
  • pnpm exec prettier --check plugins/websocket/index.test.ts -> all matched files use Prettier code style
  • git diff --check -> no whitespace errors

No production behavior was changed; this is intentionally scoped to plugins/websocket/index.test.ts and is separate from the active Durable Object WebSocket coverage slice.

AI-assisted with Codex; I reviewed the diff and kept the PR to this focused plugin coverage gap.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant