Skip to content

[Test]: CopilotcliRule has critically insufficient test coverage (63 lines vs ~1000 for other tools) #11

@flanny7

Description

@flanny7

Hello, I always appreciate rulesync.

Problem

copilotcli-rule.test.ts contains only 63 lines with a single test case, while comparable rule test files for other tools are an order of magnitude larger. This leaves the CopilotcliRule implementation almost entirely untested.

Evidence

Test file sizes across similar implementations:

Tool Test file lines
cursor 865
kilo 951
opencode 957
copilot 1,133
copilotcli 63

The single existing test covers only fromRulesyncRule(). The following are entirely absent:

  • fromFile() (non-root, root, global mode)
  • toRulesyncRule() roundtrip
  • forDeletion()
  • isTargetedByRulesyncRule() (target matching "copilotcli" vs "copilot")
  • Error handling cases
  • Global mode path generation

Proposed Solution

Expand copilotcli-rule.test.ts to cover the same scenarios as copilot-rule.test.ts, with adjustments for copilotcli-specific paths and target names. Particular attention should be given to verifying that CopilotcliRule correctly inherits behavior from CopilotRule without unexpected overrides.

Your consideration would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions