Skip to content

test: add regression tests for v0.3.4/v0.3.5 bug fixes #11

Closed

Description

@dahai80

Problem

The 3 bugs fixed in v0.3.4 and v0.3.5 had no test coverage:

  1. renderToolUseMessage crash (v0.3.4) — BuiltTool type from TOOL_DEFAULTS only allowed 0-1 params, but call sites passed 2 args
  2. Mode hint overlap (v0.3.4) — shift+tab hint overlapped input box while typing
  3. SessionEnd hook crash (v0.3.5) — accessing hookSpecificOutput on null json crashed

Solution

Add 3 test files covering all 3 regression scenarios:

  • tests/utils/tool.test.ts — 6 tests for buildTool/renderToolUseMessage
  • tests/hooks/hook-specific-output.test.ts — 8 tests for hookSpecificOutput null guard
  • tests/components/PromptInput/mode-hint-visibility.test.ts — 8 tests for shouldShowModeHint logic

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions