Skip to content

Add and modify uniqueItems tests #525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 3, 2021

Conversation

DrGFreeman
Copy link
Contributor

Fixes #524

Improve uniqueItems tests to ensure validators verify all elements of arrays for uniqueness:

  • Use more than two items in the test arrays.
  • Set the first and last items as non-unique where applicable.
  • Add tests for arrays of unique and non-unique strings.

Improve uniqueItems tests to ensure validators verify all elements of
arrays:
- Use more than two items in the test arrays.
- Set the first and last items as non-unique where applicable.
- Add tests for arrays of unique and non-unique strings.
@Julian
Copy link
Member

Julian commented Nov 3, 2021

Thanks -- this is essentially good, but we try not to modify tests unless they're incorrect -- can you instead add the 3+ element test as a separate test rather than modifying the existing one?

And appreciated!

@DrGFreeman
Copy link
Contributor Author

Sure! I'll add tests for the three elements instead of modifying existing ones.

@DrGFreeman
Copy link
Contributor Author

@Julian, as per your request I've modified the PR to only add tests and not modify existing ones. Let me know if you'd like me to squash the commits into a single one. Thx.

@Julian
Copy link
Member

Julian commented Nov 3, 2021

Thanks! Merging, looks great.

@Julian Julian merged commit 9263b52 into json-schema-org:master Nov 3, 2021
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.

Tests for uniqueItems only test arrays with two items
2 participants