-
Notifications
You must be signed in to change notification settings - Fork 59
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
hasInitialValue_ should return false if value is undefined, but validators should run regardless. Fixes #259 #276
Conversation
…ators should run regardless. Fixes metal#259
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.
Hey @Robert-Frampton, do we really need all three tests in this PR? Aren't they all testing over the same source code, or is there some integration point worth re-testing?
Hey @jbalsas I'm fairly certain we could just keep the test in I'm honestly fine either way, do you wanna remove them? |
Are we sure about this change? Having initial value means that the user passed a value, even if it is |
This wasn't the original behaviour, if I understood @Robert-Frampton correctly in this comment, which points to the current behaviour to be unintended...
We just didn't have a test back then that would've caught the change... |
@jbalsas we had this conversation by that time, and the topic was if we should consider that a passed |
I just agreed because @Robert-Frampton found out that was the old behaviour. I would defend that this is actually wrong and unintended... initialConfig = {
foo: undefined
};
ComponentDataManager.setUp(component, {
foo: {
value: 'defaultFoo'
}
});
assert.strictEqual(component.foo, 'defaultFoo'); // I would really expect it to be undefined |
Uhh, that's odd, if it was like this before, and now we have it different for few months, return to the old behavior might break users' code. Let's move with the fix for the regression, we have to deal with the breaking change. Thank you for clarifying it! |
Hey @Robert-Frampton, I'm fine keeping the tests for now, under the assumption that we want to verify that all the managers work that way and are not allowed to overwrite this behaviour. I'm merging to |
No description provided.