-
Notifications
You must be signed in to change notification settings - Fork 935
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
fix: performance improvement (#2043) #2044
fix: performance improvement (#2043) #2044
Conversation
Co-authored-by: Jason Quense <monastic.panic@gmail.com>
Co-authored-by: Jason Quense <monastic.panic@gmail.com>
@jquense I think I made all requested changes, is there anything pending from me to approve the PR? |
thanks! |
@tedeschia unfortunately this broke a lot of tests so i had to revert. If you want re-open and fix the failures i'll happily merge it again |
yes I'll do it! and will submit the changes required to fix the failing tests as soon as possible.
thanks
…________________________________
De: Jason Quense ***@***.***>
Enviado: viernes, 28 de julio de 2023 10:14
Para: jquense/yup ***@***.***>
Cc: Adrian Tedeschi ***@***.***>; Mention ***@***.***>
Asunto: Re: [jquense/yup] fix: performance improvement (#2043) (PR #2044)
@tedeschia<https://github.com/tedeschia> unfortunately this broke a lot of tests so i had to revert. If you want re-open and fix the failures i'll happily merge it again
—
Reply to this email directly, view it on GitHub<#2044 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAOSCPKO5BIWQFCCMDZM4UTXSO3LFANCNFSM6AAAAAAZ4I3NVU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@jquense the reason of tests failing is having changed the inheritance of ValidationError from Error. But that change make this kind of assertion to fail: Reverting "ValidationError implements Error" to "ValidationError extends Error" makes all the tests run OK. Do you think I can keep the ValidationError change and rewrite the tests to handle this new kind of ValidationError object? If you are OK I can work on it. Thanks! |
The concern here is in our tests broke because it doesn't recognize the throw object as an error then lots of other ppls tests are going to break as well. I don't think the inheritance is necessarily the problem, it might just be shape of the error is different in an important way (less the stack trace) |
@jquense yes you are right. inspecting jest toThrow code I noticed it checks for error object this way:
so adding |
Resolves performance issues for large data validation described on #2043 :