Conversation
Summary of ChangesHello @fi3ework, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the test runner's capabilities for AI-driven development by introducing a dedicated Markdown (md) reporter. This new reporter outputs test results in a highly structured and machine-readable Markdown format, making it ideal for AI agents and LLMs to process and understand test outcomes. Crucially, it is now the default reporter in AI agent environments when no other reporting configuration is provided, ensuring seamless integration with automated systems. The changes also include robust testing and updated documentation to support this new feature. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new Markdown reporter (MdReporter) designed for AI agent and LLM integrations. It intelligently defaults to this reporter in agent environments when no other reporter is explicitly configured, enhancing the tool's usability in automated contexts. The changes include the full implementation of the MdReporter, updates to the CLI to conditionally display the rstest banner, and comprehensive documentation in both English and Chinese. The new reporter provides detailed, structured output for test failures, including code frames, stack traces, and reproduction commands, which is highly beneficial for debugging and automated analysis.
Deploying rstest with
|
| Latest commit: |
a465df1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0b767976.rstest.pages.dev |
| Branch Preview URL: | https://md.rstest.pages.dev |
706283b to
c48e232
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces an AI/LLM-friendly markdown (md) reporter, wires it into the core reporter system, makes it the default in AI agent environments, and documents the new behavior along with comprehensive e2e coverage.
Changes:
- Adds a new
MdReporterimplementation with configurable presets and options tailored for agents (repro commands, trimmed stacks, candidate files, console limits, etc.). - Updates the CLI to detect AI agent environments, default to the
mdreporter when no reporter is explicitly configured, and avoid printing the usual banner for agents. - Extends reporter type definitions, documentation (EN + ZH), and adds extensive e2e tests and fixtures for the new markdown reporter behavior (failures, timeouts, snapshot mismatches, console output, truncation, and passing runs).
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
website/docs/zh/guide/basic/reporters.mdx |
Documents the md reporter in the Chinese basic guide and links built-in reporter options to packages/core/src/types/reporter.ts. |
website/docs/zh/config/test/reporters.mdx |
Notes the centralized reporter options type definitions and describes the AI agent defaulting to ['md'] when no reporters are configured (ZH config docs). |
website/docs/en/guide/basic/reporters.mdx |
Adds the md reporter to the built-in reporters table and explains its markdown output for agent/LLM use in the English guide. |
website/docs/en/config/test/reporters.mdx |
Adds a reporter options reference and an “AI agent environments” info block describing the ['md'] default behavior (EN config docs). |
packages/core/src/types/reporter.ts |
Defines BuiltInReporterNames including 'md', introduces MdReporterOptions, extends BuiltinReporterOptions, and adds filterRerunTestPaths to the reporter onTestRunEnd contract. |
packages/core/src/reporter/md.ts |
Implements MdReporter, including option resolution, stack/frames/sourcemap handling, candidate file scoring, code-frame generation, repro command construction based on package manager, and markdown report generation. |
packages/core/src/core/rstest.ts |
Registers MdReporter in reportersMap, imports BuiltInReporterNames from the types module, passes fileFilters and command into reporter init, and re-exports the reporter name type. |
packages/core/src/cli/init.ts |
After resolving config, detects AI agent environments and, when no reporters are configured and no --reporter is provided, overrides config.reporters to ['md']. |
packages/core/src/cli/commands.ts |
Uses determineAgent() to skip showRstest() when running under an AI agent, avoiding noisy banners for automated consumers. |
e2e/reporter/rstest.agentMd.truncated.config.ts |
E2E config targeting fixtures/agent-md/truncated.test.ts with md reporter in a compact, truncated-failures setup for testing failure list truncation behavior. |
e2e/reporter/rstest.agentMd.timeout.config.ts |
E2E config for timeout behavior with compact md reporter, reduced testTimeout, and minimal extra output. |
e2e/reporter/rstest.agentMd.throw.config.ts |
E2E config for thrown error formatting with compact md reporter and simplified stack/candidate output. |
e2e/reporter/rstest.agentMd.snapshotMismatch.config.ts |
E2E config to exercise snapshot mismatch labeling under the compact md reporter. |
e2e/reporter/rstest.agentMd.pass.config.ts |
E2E config for passing/skip scenarios using the compact md reporter, used to validate focused vs non-focused passing run behavior. |
e2e/reporter/rstest.agentMd.console.config.ts |
E2E config enabling console capture with specific console limits to verify console output handling in the md reporter. |
e2e/reporter/rstest.agentMd.config.ts |
Shared E2E config for general agent-md failure cases with the compact md reporter preset. |
e2e/reporter/md.test.ts |
Comprehensive E2E test suite asserting markdown output snapshots for diffs, snapshot mismatches, console logs, thrown errors, timeouts, truncation behavior, and passing test listing; contains a minor mismatch between one test’s description and its snapshot (commented). |
e2e/reporter/index.test.ts |
Adjusts the “default - single file” reporter test to use a path relative to the reporter E2E directory (fixtures/index.test.ts) with cwd set to __dirname. |
e2e/reporter/fixtures/agent-md/truncated.test.ts |
Fixture with multiple failing tests to drive and verify failure list truncation and repro command generation in the md reporter. |
e2e/reporter/fixtures/agent-md/timeout.test.ts |
Fixture containing a deliberately non-resolving promise to trigger and test timeout error reporting. |
e2e/reporter/fixtures/agent-md/throw.test.ts |
Fixture that throws a plain error to validate non-assertion error formatting in markdown output. |
e2e/reporter/fixtures/agent-md/snapshotMismatch.test.ts |
Fixture with an inline snapshot mismatch to exercise snapshot-specific error typing in the markdown reporter. |
e2e/reporter/fixtures/agent-md/index.test.ts |
Basic failing test fixture used to verify core markdown failure formatting and summary. |
e2e/reporter/fixtures/agent-md/console.test.ts |
Fixture that logs to console.log/warn/error before a failure, used to validate captured console output and code-frame rendering. |
e2e/reporter/fixtures/agent-md-pass/many.test.ts |
Many-passing-tests fixture supporting focused vs non-focused pass behavior checks for the md reporter. |
e2e/reporter/fixtures/agent-md-pass/focusedSkip.test.ts |
Fixture with one passing and one skipped test to validate how passed and skipped lists are rendered in markdown reports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary
Related Links
Checklist