-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add spec violation rules #141
Closed
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
92c46af
Custom validations
tdelmas 50dfba6
Better display & error counts
tdelmas 12c640a
Regroup all errors on front
PierrickP 9cc5938
Rename otherValidation to nonSchemaValidation
PierrickP 2170404
Add `duplicate_vehicle_type_id` error
PierrickP f9dfc5a
Fix typos
tdelmas deae327
Fix when `errors` is `false` but not `nonSchemaErrors`
tdelmas bb49a1c
Most review suggestions
tdelmas 1435e7f
Removes the rules that are not in the spec
richfab bad9010
Collapse errors and warnings
richfab 598e14f
Provide the actual value of last_updated
richfab 352b25b
Fix typo in exhaustive
richfab 00028ff
Improve test message
richfab a3e498e
Return the result of hasErrors and hasWarnings
richfab 86cd938
Specify from which version the rules apply
richfab 8f4ba14
Use forEach in loops instead of map
richfab 3054d26
Fix line starting with semicolon
richfab 7013a67
Use Array#some
richfab 1e0569d
Take metadata out of error message for consistency
richfab e747ccb
Typo in multipolygon
richfab 1844e72
Variable name for coordinates of a multipolygon
richfab cf2bfae
Variable name polygonCoordinates
richfab b4a2832
Rename variable o to rules
richfab d271ba8
Undo Use Array#some because the tests failed
richfab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is good practice to not use real clocks in tests. It makes tests more reliable and readable. Jest has as of v27 the ability to do this neatly: https://jestjs.io/docs/jest-object#jestsetsystemtimenow-number--date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great idea, but this is beyond my knowledge unfortunately (even after reading the docs). Anyone, feel free to suggest an implementation. Thanks!