Skip to content

improve schema validation: error formatting, edge case tests, stdin test#23

Open
JaredHatfield wants to merge 1 commit into
mainfrom
fix/schema-validation-improvements
Open

improve schema validation: error formatting, edge case tests, stdin test#23
JaredHatfield wants to merge 1 commit into
mainfrom
fix/schema-validation-improvements

Conversation

@JaredHatfield
Copy link
Copy Markdown
Member

Changes from code review improvements:

  • Error formatting: Changed to for cleaner error messages in
  • Unit tests: Added 5 tests for edge cases:
    • No front matter with required fields (should fail)
    • No front matter with optional schema (should pass)
    • Empty front matter with optional schema (should pass)
    • Empty front matter with required fields (should fail)
    • Nil document with optional schema (should pass)
  • Integration test: Added stdin + test case

… add stdin integration test

- Change %w: %v to %w: %s for cleaner error messages
- Add unit tests for nil doc, no front matter, and empty front matter
- Add integration test for stdin + --schema combination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant