Skip to content

test: add unit tests for ai-chat utils#3016

Merged
Salazareo merged 1 commit intomainfrom
DS/2956
May 8, 2026
Merged

test: add unit tests for ai-chat utils#3016
Salazareo merged 1 commit intomainfrom
DS/2956

Conversation

@Salazareo
Copy link
Copy Markdown
Member

Covers Messages (normalize_single_message / normalize_messages / extract_and_remove_system_messages / extract_text), FunctionCalling (normalize_json_schema / normalize_tools_object /
make_openai_tools / make_claude_tools), and Streaming (AIChatStream / AIChatMessageStream / AIChatTextStream / AIChatToolUseStream). All three are pure data transforms — Streaming is exercised against a real AIChatStream wired to a buffering Writable, so no method-level spies are needed.

Closes #2956

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 36.1%
⬆️ +0.89%
6344 / 17572
🔵 Statements 35.24%
⬆️ +0.89%
6718 / 19062
🔵 Functions 38.03%
⬆️ +0.91%
1136 / 2987
🔵 Branches 24.94%
⬆️ +0.84%
3500 / 14030
File CoverageNo changed files found.
Generated in workflow #70 for commit 3e42e93 by the Vitest Coverage Report Action

Covers `Messages` (normalize_single_message / normalize_messages /
extract_and_remove_system_messages / extract_text), `FunctionCalling`
(normalize_json_schema / normalize_tools_object /
make_openai_tools / make_claude_tools), and `Streaming`
(AIChatStream / AIChatMessageStream / AIChatTextStream /
AIChatToolUseStream). All three are pure data transforms — Streaming
is exercised against a real `AIChatStream` wired to a buffering
Writable, so no method-level spies are needed.

Closes #2956
@Salazareo Salazareo merged commit 5e8e9a8 into main May 8, 2026
4 checks passed
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.

[Tests] Add unit tests for ai-chat utils (Messages, FunctionCalling, Streaming)

1 participant