-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add mandatory test 6.1.27.17 #342
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
base: main
Are you sure you want to change the base?
Conversation
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.
Please see my comment
assert.equal( | ||
mandatoryTest_6_1_27_17({ | ||
document: 'invalid json', | ||
notes: [], |
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.
Is it intended that the notes
is outside the document
or am I missing something?
document: { | ||
category: 'unknown category', | ||
}, | ||
notes: [], |
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.
Is it intended that the notes
is outside the document
or am I missing something?
Don't forget to update the README - removing it from the known issues and placing it into the supported tests. |
// not yet included in the filtering since it is checked below for each note | ||
// individually to improve the error messages. | ||
doc.document.notes?.flatMap((n, i) => | ||
n.title === 'Reasoning for Withdrawal' ? { note: n, index: i } : [] |
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.
Maybe similar to the implementation in #343 as variable?
ctx.errors.push({ | ||
instancePath: `/document/notes/${index}`, | ||
message: | ||
'the category of the "Reasoning for Withdrawal" note must be "description"', |
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.
Same here.
ctx.errors.push({ | ||
instancePath: `/document/notes`, | ||
message: | ||
'needs exactly one entry with the title "Reasoning for Withdrawal"', |
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.
And here
No description provided.