Skip to content

fix: resolve failing tests across codebase#115

Open
marton78 wants to merge 8 commits into
dirac-run:masterfrom
marton78:fix-tests
Open

fix: resolve failing tests across codebase#115
marton78 wants to merge 8 commits into
dirac-run:masterfrom
marton78:fix-tests

Conversation

@marton78
Copy link
Copy Markdown

@marton78 marton78 commented May 30, 2026

This PR fixes all previously failing tests through a combination of code corrections and test updates.

Changes

  • UIHelpers: Fixed undefined parameter forwarding in removeLastPartialMessageIfExistsWithType
  • Tool spec: Always include additionalProperties:false in OpenAI tool parameters
  • Test handlers: Fixed EditFile and RenameSymbol tool handler test configs
  • Test providers: Updated usage chunk tests to account for totalCost addition
  • Snapshots: Updated system prompt snapshots for recent OS/shell and prompt text changes
  • Test mocks: Fixed stdin.write mocking in skills-panel and ink-picture output pollution in component tests
  • Test assertions: Updated label assertions after formatMessage refactor

All tests now pass.

…ctor

Tool-call label changed from "Tool:" to "Tool Call", command and
browser_action_launch ask labels changed to "Use tool?", and browser_action
moved to the verbose-only fallback path. Update the four affected
assertions in display.test.ts to match the current output.
@marton78 marton78 changed the title fix tests fix: resolve failing tests across codebase May 30, 2026
marton78 and others added 7 commits May 31, 2026 00:25
ink v7 causes TerminalInfoProvider to emit �[16t (terminal pixel-size
query) during tests, corrupting stdout and breaking assertions. Add
vi.mock("ink-picture", ...) to App, App.resize-initial-prompt, ChatView,
and QuitCommand tests. Also rewrite QuitCommand's stdin.write-based
keyboard simulation to use a useChatInputHandler wrapper mock, which the
ink v7 event model requires.
…mock

ink v7 no longer delivers stdin events to useInput handlers via
ink-testing-library, so all keyboard-interaction tests in
SkillsPanelContent.test.tsx were failing. Replace stdin.write() calls with
a vi.mock("ink") that captures the registered useInput handler into a ref,
then invoke it directly via a pressKey() helper.
…pt text changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…arameters

Previously only added in strict mode, causing the OpenAI no-params tool test
to fail. Also switches tools snapshot comparison to deep object equality so
JSON property ordering no longer causes spurious failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sage output

openRouterDefaultModelInfo now has non-zero pricing, so stub models with
zero prices and assert totalCost:0 explicitly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- debug_syntax: add missing messageState stub (syncCache reads conversation history)
- RenameSymbol: resolve displayPath to absolute before writing in saveChanges mock,
  and add showReview/hideReview stubs required by the non-auto-approve path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ialMessageIfExistsWithType

The wrapper was always passing the optional third argument explicitly, even
when undefined. sinon's calledWithExactly treats f("a","b",undefined) and
f("a","b") as different calls, causing SubagentToolHandler partial-streaming
tests to fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant