-
-
Notifications
You must be signed in to change notification settings - Fork 216
Additional keyword tests #257
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
Additional keyword tests #257
Conversation
That's a lot to review :D -- but thanks! Definitely looks super useful. Will see what I can get through. And yeah I think the performance ones make sense not to include -- FWIW, in my validator what I do is just run performance tests over all the tests that are here, but it definitely sounds reasonable to have large examples to really exercise things -- would agree here is not the best place though (I have some of those, but yeah they are definitely separate from the suite). |
OK, but not that bad given it's just the same tests for the 3 drafts more or less. Cool, lgtm! Merging. |
What I mean is that validation code in my case would be different depending on the schema - e.g. uniqueItems is usually O(n2) time, but if items must have scalar types it would use hash with O(n) time... Anyway, I will only submit generic tests. |
Wait, did this check in an entire dependency? |
@awwright not a new dependency -- this just merged in some additional (edge case) tests that @epoberezkin had in his validator but not upstream. Make sense, or does something look off? |
@Julian That makes sense! |
@Julian as discussed in #253 (comment), I've added several tests for keywords. There are more tests for $ref and some other special cases that are not limited to ajv (I will make separate PRs).
What I meant by implementation specific tests, see these two for example:
Ajv has performance optimisation that these tests invoke. They are not in this PR - I don't think they should be here, but let me know what you think.