-
Notifications
You must be signed in to change notification settings - Fork 9
Fix tests #68
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
Conversation
format: 'date-time' | ||
anyOf: [ | ||
'$ref': 'headline.json' | ||
, |
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.
Use { '$ref': 'headline.json' }
and you don't have to have the comma on a separate line. Or at all, I think.
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 arguable which syntax is prettier. But anyway, the main point here is to get back to point where we're actually testing things
@@ -21,7 +20,7 @@ describe 'Schemas', -> | |||
schemas.forEach (schema) -> | |||
describe "#{schema.id} (#{schema.title})", -> | |||
try | |||
cases = lib.getExamples schemaName | |||
cases = lib.getExamples path.basename schema.id, path.extname schema.id |
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.
Why, what is the difference?
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.
getExamples
works on names only (contentblock
), while schema.id
is full filename (contentblock.json
)
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.
Yes, but but schemaName
(which was used before) is also just the name?
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.
Yes, but we're now in a separate loop
Was it only invalid schemas which were not caught? And why were they not caught by checking invalid examples? |
@jonnor we were not catching them because:
|
@jonnor this iteration should be good to go. Next step will be validating |
@bergie What do you mean by "validating required"? |
@jonnor going through them and making only input-side required attributes |
@bergie Ok. Please put them into a |
Or |
@jonnor can we merge? This should fix a lot of stuff already |
Yep |
Seems like our tests were not actually catching invalid schemas. This PR rectifies that.