Skip to content

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

Merged
merged 6 commits into from
Mar 24, 2019
Merged

Additional keyword tests #257

merged 6 commits into from
Mar 24, 2019

Conversation

epoberezkin
Copy link
Member

@epoberezkin epoberezkin commented Mar 24, 2019

@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.

@epoberezkin epoberezkin requested a review from Julian March 24, 2019 11:30
@Julian
Copy link
Member

Julian commented Mar 24, 2019

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).

@Julian
Copy link
Member

Julian commented Mar 24, 2019

OK, but not that bad given it's just the same tests for the 3 drafts more or less.

Cool, lgtm! Merging.

@Julian Julian merged commit 3c3881a into json-schema-org:master Mar 24, 2019
@epoberezkin
Copy link
Member Author

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).

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.

@epoberezkin epoberezkin deleted the epoberezkin/keyword-tests branch March 25, 2019 07:00
@awwright
Copy link
Member

Wait, did this check in an entire dependency?

@Julian
Copy link
Member

Julian commented Mar 25, 2019

@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?

@awwright
Copy link
Member

@Julian That makes sense!

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.

3 participants