Skip to content

Comments

feat: property-based tests for URL building and direction parsing#62

Open
byte-the-bot wants to merge 2 commits intomainfrom
byte/property-tests
Open

feat: property-based tests for URL building and direction parsing#62
byte-the-bot wants to merge 2 commits intomainfrom
byte/property-tests

Conversation

@byte-the-bot
Copy link
Collaborator

Summary

  • Adds proptest as a dev dependency for property-based testing
  • 11 new property tests for build_endpoint_url: validates URL parseability, scheme/host/port/query preservation, endpoint placement, and no double slashes
  • Property tests for parse_direction: round-trip through Display, case insensitivity, rejection of non-direction strings

Resolves BS-143.

Test plan

  • All 25 tests pass (14 existing + 11 new)
  • CI passes

🤖 Generated with Claude Code

Add proptest-based property tests for build_endpoint_url and
parse_direction in snake_client.rs. Tests verify:

- URL output is always parseable
- Scheme, host, port, and query params are preserved
- Endpoint appears at the end of the path
- No double slashes in paths
- Direction parsing round-trips through Display
- Direction parsing is case-insensitive
- Non-direction strings are rejected

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant