Skip to content

Add unit tests for limits.AdaptiveDepth #24

@JordanCoin

Description

@JordanCoin

Problem

limits/limits.go has no test file. AdaptiveDepth is a hub file (imported by 3 packages) and its threshold logic determines tree depth for all repos.

Suggested fix

Add a table-driven test in limits/limits_test.go covering:

  • Unknown file count (<=0) → depth 2
  • Small repo (e.g. 100 files) → depth 4
  • Medium repo (e.g. 3000 files) → depth 3
  • Large repo (e.g. 6000 files) → depth 2
  • Boundary values at 2000 and 5000

Quick win for confidence in a high-impact function.

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