Skip to content

feat: increase test coverage and add centralized test results infrastructure#2

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/increase-test-coverage
Draft

feat: increase test coverage and add centralized test results infrastructure#2
Copilot wants to merge 2 commits intomainfrom
copilot/increase-test-coverage

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 3, 2026

Adds unit tests for two completely untested modules, wires up machine-readable test reporters, and establishes a documented strategy for capturing and retaining test results across CI runs.

New tests

  • @ag-ui/core capabilities (capabilities.test.ts) — 39 tests covering all 13 capability schemas (SubAgentInfo, IdentityCapabilities, TransportCapabilities, ToolsCapabilities, OutputCapabilities, StateCapabilities, MultiAgentCapabilities, ReasoningCapabilities, MultimodalInput/OutputCapabilities, MultimodalCapabilities, ExecutionCapabilities, HumanInTheLoopCapabilities, AgentCapabilitiesSchema). Covers happy paths, all-optional fields, nested validation, type rejection, and unknown-key stripping.
  • @ag-ui/encoder media-type (media-type.test.ts) — 16 tests for preferredMediaTypes: undefined/empty Accept, exact matching, wildcard (*/*, text/*), quality-value ordering, q=0 exclusion, parameter matching, case insensitivity, and complex multi-entry headers.

Test results infrastructure

vitest.base.ts — Adds junit and json reporters when CI=true, writing per-package output to ./test-results/. No change to local DX (still verbose only).

unit-typescript-sdk.yml — Switches to test:coverage; uploads two artifact bundles per run:

Artifact Contents Retention
unit-test-results JUnit XML + JSON per package 90 days
unit-coverage-reports Istanbul HTML/JSON per package 30 days

test-results/README.md — Documents the directory layout, active reporters (unit + e2e), and recommends Codecov, SonarCloud, Allure, or a self-hosted S3 bucket for long-term cross-run trending.

.gitignore — Tightened from test-results/ (nukes everything) to **/test-results/ + !test-results/README.md so generated files are excluded everywhere while the root README is tracked.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/ag-ui/ag-ui/apps/dojo/node_modules/.bin/../next/dist/bin/next build bash odul�� --noprofile (dns block)
  • us.posthog.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/ag-ui/ag-ui/integrations/mastra/typescript/examples/node_modules/.bin/../mastra/dist/index.js build sh -c "mcp-server-playwright" --viewport-size '1280, 720' --output-dircredential.username (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

…ructure

- Add 39 new tests for @ag-ui/core capabilities schemas (SubAgentInfo,
  Identity, Transport, Tools, Output, State, MultiAgent, Reasoning,
  MultimodalInput/Output, Multimodal, Execution, HumanInTheLoop,
  AgentCapabilities) — previously untested
- Add 16 new tests for @ag-ui/encoder preferredMediaTypes utility
  (undefined/empty accept, exact match, wildcard, quality values,
  parameters, case insensitivity, complex headers) — previously untested
- Update vitest.base.ts: add JUnit XML and JSON reporters when CI=true so
  every CI run writes machine-readable results that can be uploaded as artifacts
- Update unit-typescript-sdk.yml: run test:coverage instead of test, upload
  unit-test-results (90-day) and unit-coverage-reports (30-day) as artifacts
- Add test-results/README.md documenting centralized results layout, reporters
  in use, and historical storage recommendations (Codecov, SonarCloud, Allure,
  self-hosted S3)
- Update .gitignore: ignore all package-level test-results/ dirs while keeping
  the root test-results/README.md tracked

Agent-Logs-Url: https://github.com/jamesmkfoo23/ag-ui/sessions/625386c6-228e-4923-bb60-babfcd82d937

Co-authored-by: jamesmkfoo23 <45367108+jamesmkfoo23@users.noreply.github.com>
Copilot AI changed the title [WIP] Increase test and E2E test coverage and capture results feat: increase test coverage and add centralized test results infrastructure Apr 3, 2026
Copilot AI requested a review from jamesmkfoo23 April 3, 2026 23:07
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.

2 participants