Skip to content

test: add property-based tests for parsers and resolvers #167

@rocketman-code

Description

@rocketman-code

Context

Parent: #160

The import parsers, resolvers, and flag parsers accept complex string inputs where edge cases are hard to enumerate manually. Property-based testing (proptest) can systematically explore the input space.

Expected Behavior

Proptest strategies that generate random but structured inputs and verify invariants hold.

Scope

  • parse_flags: arbitrary flag sequences never panic, always return Ok or Err
  • Command::parse: arbitrary strings never panic
  • classify_diff_arg: arbitrary strings never panic (may return error)
  • Import parsers (TS + Python): arbitrary source code never panics (may return empty imports)
  • Resolvers: resolved paths are always canonical and within project root
  • format_size: output is always parseable back to a number, monotonically increasing with input
  • ModuleGraph: adding edges between valid NodeIds never panics

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priorityenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions