Skip to content

chore: test JSONPath queries and schema validation - #107

Merged
anurag629 merged 1 commit into
codercops:developfrom
kudala-bharani:chore/97-json-query-validation-tests
Oct 1, 2026
Merged

anurag629 merged 1 commit into
codercops:developfrom
kudala-bharani:chore/97-json-query-validation-tests

Conversation

@kudala-bharani

Copy link
Copy Markdown
Contributor

What and why

Adds 20 tests for the JSONPath and JSON Schema helpers. They cover empty and invalid inputs, the sample queries and their paths, no-match results, and validation errors for required properties, minimum values, and string lengths.

Branched from the latest develop, including the Vitest 4 upgrade. Only the two test files changed.

Closes #97

Type of change

  • Bug fix
  • New tool or feature
  • Tests
  • Refactor or cleanup
  • Docs

Checklist

  • npm run lint && npm run test && npm run build passes locally
  • Logic changes live in lib/ and have a test in lib/__tests__/ — tests only; no logic changes
  • No analytics, trackers, or calls that send user data off-device
  • Works in both light and dark themes (if UI changed) — not applicable
  • Inputs have labels and it works with the keyboard alone (if UI changed) — not applicable
  • New tool: registry entry, page.tsx, client component, opengraph-image.tsx, and the bug report dropdown are all done — not applicable

Notes for reviewers

Verified with Node 22.23.3 and Vitest 4.1.11: all 85 tests pass, lint exits successfully, and the production build passes. Lint still reports 13 warnings in unchanged files; the two new test files pass with zero warnings.

@anurag629 anurag629 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @kudala-bharani, nice work again! This covers everything in #97, and I like that the error tests check the exact parse messages for both empty data and an empty schema. CI is green, merging this now.

If you want another one, just comment on any open hacktoberfest issue and I'll assign it to you.

@anurag629 anurag629 added the hacktoberfest-accepted PR counts for Hacktoberfest label Oct 1, 2026
@anurag629
anurag629 merged commit 5c4d777 into codercops:develop Oct 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PR counts for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for lib/jsonpath.ts and lib/jsonSchema.ts

2 participants