Skip to content

test(coding-agent): add unit tests for extractUserMessageText - #361

Open
Shellghostt wants to merge 1 commit into
dmae97:mainfrom
Shellghostt:test-session-message-text
Open

Shellghostt wants to merge 1 commit into
dmae97:mainfrom
Shellghostt:test-session-message-text

Conversation

@Shellghostt

Copy link
Copy Markdown

Closes #341

Summary

Adds direct unit tests for extractUserMessageText in packages/coding-agent/src/core/session-message-text.ts, which previously had no dedicated test file. Tests only; no source changes.

Coverage

  • A string is returned unchanged (including the empty string).
  • Text parts are joined with no separator.
  • Non-text parts (e.g. { type: "image" }) are skipped.
  • Text parts with no text field are skipped.
  • An empty array returns "".

Tests

  • node ../../node_modules/vitest/dist/cli.js --run test/session-message-text.test.ts (from packages/coding-agent) — 5 passed.
  • biome check test/session-message-text.test.ts — clean after formatting.

@dmae97

dmae97 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

OMK Community

Thanks for opening this pull request. Mention @omk-community with reproduction steps, a question, or the review help you need.

Automated response. No code changes or merges are performed.

This branch has not been deployed

No deployments
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.

test: add unit tests for extractUserMessageText in core/session-message-text.ts

2 participants