-
Notifications
You must be signed in to change notification settings - Fork 183
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
feat(core): add runtime check for performBulk #785
feat(core): add runtime check for performBulk #785
Conversation
.filter((id) => id); | ||
|
||
const outputIds = Object.keys(results); | ||
const missingIds = inputIds.filter((id) => !outputIds.includes(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.
@FokkeZB do you think if the output should contain all the IDs in the input (bundle.bulk
)? The current implementation assumes yes.
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, correct. With outputData
and (or?) an optional error
.
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.
Updated the requirements in the description. So now each item must have an outputData
object or an error
string.
Adds a runtime check
perform-bulk-return-type
to ensure the result returned by theperformBulk
function follow the requirements:bundle.bulk
.outputData
object or anerror
string.I found there was no integration test that ran all the checks in the checkOutput middleware, so I added one. Since I enabled the checks by adding
command: 'execute'
here, some other test cases increate-app.js
started failing. I ended up refactoring many of the test cases.