Skip to content

Conversation

@bougyman
Copy link
Member

@bougyman bougyman commented Jan 4, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 4, 2026 23:56
@bougyman bougyman merged commit 35e9df4 into main Jan 4, 2026
10 checks passed
@bougyman bougyman deleted the add-series-endpoints branch January 4, 2026 23:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive test coverage to achieve 100% branch and line coverage for the Kalshi API client library. The tests cover previously untested code paths including error handling, validation edge cases, and class-level method invocations.

  • Adds validation tests for invalid filter parameters (both keys and values)
  • Adds tests for the Contract class's propertize method to cover the inherited class path
  • Adds tests for Client error handling and the singleton client accessor

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
test/kalshi/market/series_list_test.rb Improves test naming clarity and adds validation test for invalid filter value types to achieve branch coverage
test/kalshi/contract_test.rb New test file covering the Contract class's property definition mechanism including edge cases
test/kalshi/client_test.rb New test file covering Client error handling and the module-level client singleton pattern

# rubocop:enable Lint/ConstantDefinitionInBlock

it 'handles existing definitions' do
# This test just ensures the class definition above runs and exercises the code path
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test comment is redundant and states the obvious. Either remove the comment entirely or make it more informative by explaining why this edge case matters for coverage (e.g., "Ensures propertize handles properties that already exist via Reform's property method").

Suggested change
# This test just ensures the class definition above runs and exercises the code path
# Ensures propertize correctly adds properties on a class that already defines properties via property

Copilot uses AI. Check for mistakes.
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.

2 participants