Skip to content

Add property-based tests for nested-object JSON converters#96

Merged
SeanTAllen merged 1 commit intomainfrom
sean/nested-object-json-converter-tests
Mar 3, 2026
Merged

Add property-based tests for nested-object JSON converters#96
SeanTAllen merged 1 commit intomainfrom
sean/nested-object-json-converter-tests

Conversation

@SeanTAllen
Copy link
Copy Markdown
Member

Completes discussion #93 item 3: tests for converters that delegate to other converters for nested objects (GitCommitJsonConverter, CommitJsonConverter, IssueJsonConverter).

Adds 5 reusable JSON builder helpers (_TestGitPersonJson, _TestCommitFileJson, _TestGitCommitJson, _TestLabelJson, _TestIssuePullRequestJson) that compose to build valid nested JSON structures for testing.

7 new test classes:

  • GitCommit: preserves-values, missing-field (4 required fields)
  • Commit: preserves-values with nested files array + git_commit, missing-field (6 required fields)
  • Issue: preserves-values with nullable state/body + nested user/labels/pull_request, missing-field (12 required fields), absent-pull-request verifying optional field handling

Completes discussion #93 item 3: tests for converters that delegate to
other converters for nested objects (GitCommitJsonConverter,
CommitJsonConverter, IssueJsonConverter).

Adds 5 reusable JSON builder helpers (_TestGitPersonJson,
_TestCommitFileJson, _TestGitCommitJson, _TestLabelJson,
_TestIssuePullRequestJson) that compose to build valid nested JSON
structures for testing.

7 new test classes:
- GitCommit: preserves-values, missing-field (4 required fields)
- Commit: preserves-values with nested files array + git_commit,
  missing-field (6 required fields)
- Issue: preserves-values with nullable state/body + nested user/labels/
  pull_request, missing-field (12 required fields), absent-pull-request
  verifying optional field handling
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 3, 2026
@SeanTAllen SeanTAllen merged commit 4588d57 into main Mar 3, 2026
10 checks passed
@SeanTAllen SeanTAllen deleted the sean/nested-object-json-converter-tests branch March 3, 2026 01:52
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 3, 2026
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