test: add comprehensive test suite (848 tests, 11 files) - #16
Merged
ZouR-Ma merged 7 commits intoJun 11, 2026
Conversation
Coverage: - utils (302 tests): text, math, error, json, mutable-ref, display-width, search, json-schema, shell, async-queue, path, token-estimator, tool-call-repair, clarification, user-message, assistant-message - core (150 tests): args, presentation-profile, security, agent-presets, harness-context, state-machine, tool-policy, delegation-view - skills (89 tests): apply-patch, command-output, tool-inspection, tool-result-truncation - llm (127 tests): factory, Anthropic client, OpenAI client, http-transport pure functions - mcp (48 tests): MCP manager, MCP tool-plugin - agent-sdk (53 tests): outbound-queue, session-store, event-translator, mcp-inproc, tool-risk, error-codes, preset, input-queue - config (79 tests): config-loader, runtime-config Also updates vitest.config.ts with deep import alias and test discovery for extensions/skills packages, and adds @vitest/coverage-v8 dependency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Runs lint, typecheck, and tests on push/PR to main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7 tasks
Squashed fix for 3 commits that had truncated git trees: - CI: 3-platform matrix (ubuntu, windows, macos) - Coverage thresholds: statements >= 50%, branches >= 60% - CONTRIBUTING.md: testing section added - docs/TESTING.md: coverage thresholds, CI matrix - package.json: pnpm test in check script - vitest.config.ts: coverage include + thresholds - .gitignore: add coverage/ - Fix runtime-config test timeout - Add utils-batch4 (39 tests): terminal-text, enforceOutputLimit, resolveInWorkspace, toWorkspaceRelative, expandHomeDirectory, resolveStorageRootDirectory Closes stepfun-ai#19 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CacinieP
force-pushed
the
test/add-comprehensive-test-suite
branch
from
June 11, 2026 01:57
7ce4ce9 to
a444ccb
Compare
- Split 12 batch test files into 45 individual co-located test files - Each test file sits next to its source module (e.g. text.ts + text.test.ts) - Import pattern changed from ../module.js to ./module.js (sibling) - Removed all __tests__/ directories - Added tests/helpers/ with shared mock factories and test fixtures - Updated vitest.config.ts with testTimeout/hookTimeout and tests/ include
4 tasks
Collaborator
|
Welcome aboard, and thanks for your first PR! |
knqiufan
added a commit
to knqiufan/Step-Realtime-CLI
that referenced
this pull request
Jun 11, 2026
Builds on the test infrastructure from PR stepfun-ai#16 with incremental improvements: - Add 33 new test files covering previously untested modules: packages/realtime, packages/core (agent-loop, context-window, conversation-memory, max-steps, plugins), extensions/realtime-*, skills/builtin (command-tool, file-tools, apply-patch-tool), src/ (option-parsers, gateway storage/verifier, clipboard), and 2 integration test suites (agent-loop e2e, voice-session e2e) - Enhance CI workflow with separate check/test/build jobs, concurrency control, coverage artifact upload, and build smoke test - Expand vitest coverage.include to match newly tested modules, add lcov reporter for CI integration - Add test:changed script for incremental test runs - Fix Windows path compatibility in loader.test.ts (path.join vs path.resolve for absolute paths)
Daiyimo
pushed a commit
to Daiyimo/Step-Realtime-CLI
that referenced
this pull request
Jun 12, 2026
…-test-suite test: add comprehensive test suite (848 tests, 11 files)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive test suite using vitest — 887 tests across 12 files, plus cross-platform CI and documentation.
Closes #19
#19 Acceptance Criteria
pnpm testpasses on Windows, macOS, and Linuxubuntu-latest,windows-latest,macos-latest)fail-fast: falsepnpm checkincludespnpm testtestruns first in thecheckscriptCONTRIBUTING.mdupdated with testing instructionsskipIf/runIfKey regression risks covered
resolveInWorkspaceTest suite breakdown
packages/utilspackages/coresrc(config)skills/builtinextensions/llmextensions/mcppackages/agent-sdkChanges
9cb67f2a4b84cddocs/TESTING.md+ coverage-v8 version fix0bd19b5docs/MULTI_AGENT.mdarchitecture referenceda807c4.github/workflows/test.ymlCI pipeline7c3aa4008d84797ce4ce9Relationship with #2
PR #2 adds tests using Node's built-in test runner with 56 tests covering command policy. This PR takes a different approach:
tool-policy.ts— our 30 tests are incore-batch2.test.tsThe security rule additions in #2's
tool-policy.tssource change are orthogonal and complementary. If #2's source changes merge first, our tool-policy tests may need minor updates — we are happy to rebase. This PR addresses the test infrastructure / CI / coverage requirements from #19; #2 can focus on tool-policy source hardening.CI
.github/workflows/test.ymlruns on push/PR tomainon Ubuntu, Windows, and macOS:pnpm lint→pnpm exec tsc --noEmit→pnpm testTest plan
pnpm test— 887/887 passingpnpm build— builds cleanlypnpm check— test + lint + dep-guard + deadcode + tsc + format all greenpnpm test:coverage— 53.08% stmts / 79.77% branches, thresholds enforcedCONTRIBUTING.md— testing section added🤖 Generated with Claude Code