Skip to content

test(typescript): expand multimodal coverage - #846

Open
Jonesxq wants to merge 1 commit into
Agent-Field:mainfrom
Jonesxq:tests/multimodal-comprehensive
Open

test(typescript): expand multimodal coverage#846
Jonesxq wants to merge 1 commit into
Agent-Field:mainfrom
Jonesxq:tests/multimodal-comprehensive

Conversation

@Jonesxq

@Jonesxq Jonesxq commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Adds the requested comprehensive TypeScript SDK tests for multimodal helpers. The new suite exercises text construction, image and audio factories, real temporary-file round trips, mocked audio downloads and failures, format fallbacks, and MIME inference for images, audio, documents, and extensionless files.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Docs only
  • Tests only
  • CI / tooling
  • Breaking change

Test plan

  • cd sdk/typescript && npm test -- tests/multimodal_comprehensive.test.ts (16 passed)
  • cd sdk/typescript && npm test -- tests/multimodal.test.ts tests/multimodal_comprehensive.test.ts --coverage --coverage.reportsDirectory=coverage-407 (22 passed)
  • cd sdk/typescript && npm run lint
  • cd sdk/typescript && npm test (822/823 passed; the existing resource-sensitive memory leak test reports 31.4 MB growth against a 25 MB threshold and also fails in isolation)

Test coverage

Using the unchanged multimodal.test.ts plus the new comprehensive suite, src/ai/multimodal.ts line/statement coverage increases from 38.14% to 86.59%; branch coverage is 89.58%.

  • I ran tests for the surface(s) I changed locally.
  • New code paths are covered by tests in this PR (no bare additions).
  • No code or coverage baselines were removed or lowered.
  • The coverage gate check is green in CI before requesting review.

Checklist

  • I have read docs/CONTRIBUTING.md and docs/DEVELOPMENT.md.
  • The commit follows conventional-commits style.
  • The commit is signed (no signing configuration is available in this checkout; recent main commits are also unsigned).
  • I have linked the related issue.

Related issues / PRs

Closes #407

@Jonesxq
Jonesxq requested review from a team and AbirAbbas as code owners July 31, 2026 03:26
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

[TS SDK] Expand ai/multimodal.ts test coverage

1 participant