Skip to content

Add unit tests for src/permissions/index.ts #5

Description

@aakashrajput

What

summarizeTool() (src/permissions/index.ts:211) builds the human-readable one-line summary shown in permission prompts for every tool (e.g. "read src/foo.ts", "run `npm test`"). No dedicated test file exists for this module.

Where to start

Write src/permissions/index.test.ts covering summarizeTool() for a handful of tool calls (read_file, write_file, edit_file, run_command, apply_patch) and the glob-pattern matching used for allowed_commands/denied_commands.

Acceptance criteria

Each tool type covered by summarizeTool() has at least one assertion on its exact summary string; pattern-matching logic has both a match and a non-match test case.

Why it's a good first issue

Pure logic, easy to test in isolation, good on-ramp to how permissions work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions