-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
[Bug]: Fix async validations #107
Conversation
1649ba0
to
b7e92db
Compare
b7e92db
to
3d705ff
Compare
const expectedError = { delayedAsync: { validation: false, value: 'second' } }; | ||
expect(dummyChangeset.changes).toEqual(expectedChanges); | ||
expect(dummyChangeset.error).toEqual(expectedError); | ||
}); |
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.
@BryanCrotaz fyi
let running: RunningValidations = this[RUNNING_VALIDATIONS]; | ||
let promises = Object.entries(running); | ||
|
||
return Promise.all(promises).then(() => { |
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.
So the idea here is to finish all existing validations before starting the next one in line. This won't block user interaction since the key
already has been set on the changeset. This is just an async path that will update the changset *sometime later.
close #106 #105