You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TestContext.from property is not documented yet. It was introduced in #556 without any documentation or typescript support. In an attempt to document this I stumbled upon an irregularity.
-> from seems to skip parents that are arrays.
This behavior looks like it is not accidental though since it is used in the tests:
yup underwent a reasonably significant refactoring to add typescript support after this functionality was originally introduced, I'm not sure the original PR for this functionality would be accepted if it was done again today (that's a question for @jquense)
In any case, it does indeed look like an oversight. I can't exactly remember why it might not have been built to your expectations (which I agree with, those assertions do make sense).
The
TestContext.from
property is not documented yet. It was introduced in #556 without any documentation or typescript support. In an attempt to document this I stumbled upon an irregularity.->
from
seems to skip parents that are arrays.This behavior looks like it is not accidental though since it is used in the tests:
yup/test/mixed.ts
Lines 487 to 524 in 5c77e0d
Actual
Expected
Reading the information from the PR I expected following test cases to be valid.
How could we describe current behavior?
Is the current behavior what we expect the
from
property to behave like?The text was updated successfully, but these errors were encountered: