Skip to content

Add JSON assertions with jq support#592

Merged
Chemaclass merged 3 commits intomainfrom
feat/json-assertions
Feb 21, 2026
Merged

Add JSON assertions with jq support#592
Chemaclass merged 3 commits intomainfrom
feat/json-assertions

Conversation

@Chemaclass
Copy link
Copy Markdown
Member

🤔 Background

Related #177

Adds JSON assertion support to bashunit, enabling validation of JSON structures in tests. Requires jq as an optional dependency — tests are automatically skipped with a warning when jq is not installed.

💡 Changes

  • Add assert_json_key_exists to verify a key path exists in a JSON string
  • Add assert_json_contains to verify a key holds an expected value
  • Add assert_json_equals to compare two JSON strings ignoring key order
  • All assertions gracefully skip via bashunit::skip when jq is unavailable

@Chemaclass Chemaclass added the enhancement New feature or request label Feb 21, 2026
@Chemaclass Chemaclass self-assigned this Feb 21, 2026
@Chemaclass Chemaclass added the enhancement New feature or request label Feb 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ Contributor Report

User: @Chemaclass
Status: Passed (13/13 metrics passed)

Metric Description Value Threshold Status
PR Merge Rate PRs merged vs closed 93% >= 30%
Repo Quality Repos with ≥100 stars 6 >= 0
Positive Reactions Positive reactions received 157 >= 1
Negative Reactions Negative reactions received 0 <= 5
Account Age GitHub account age 4569 days >= 30 days
Activity Consistency Regular activity over time 108% >= 0%
Issue Engagement Issues with community engagement 0 >= 0
Code Reviews Code reviews given to others 173 >= 0
Merger Diversity Unique maintainers who merged PRs 8 >= 2
Repo History Merge Rate Merge rate in this repo 89% >= 0%
Repo History Min PRs Previous PRs in this repo 127 >= 0
Profile Completeness Profile richness (bio, followers) 100 >= 0
Suspicious Patterns Spam-like activity detection 0 N/A

Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-02-21 to 2026-02-21

@Chemaclass Chemaclass changed the title feat(assert): add JSON assertions with jq support Add JSON assertions with jq support Feb 21, 2026
@Chemaclass Chemaclass merged commit 595268d into main Feb 21, 2026
25 checks passed
@Chemaclass Chemaclass deleted the feat/json-assertions branch February 21, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant