-
Notifications
You must be signed in to change notification settings - Fork 0
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
TypeScript behind on Object prototype properties #79
Comments
Does our testing framework have any way to add tests we expect to fail? If
so, we should add tests that exercise these missing features and once TS
updates we can switch them away from expected-to-fail.
…On Thu, 12 Sep 2019 at 16:39, Jack Steinberg ***@***.***> wrote:
Some Object prototype properties are overridden by the classes that
inherit from the Object prototype, and TypeScript has not reflected all of
these overridden properties in their respective types. Specifically:
URL.toString()Boolean.toString()Error.toString()
are all missing toString in their properties. We commented on this bug on
TypeScript
<microsoft/TypeScript#30225 (comment)>
to call attention to the absence, and will be tracking the issue. For now
testing of Object prototype properties will be done with the assumption
that the above are not overridden - with documentation outlining the
situation, and code that will start to fail when TypeScript is updated.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#79?email_source=notifications&email_token=ABAO5ZZOL57B3YXMQF7KGZTQJHW4ZA5CNFSM4IWAKJE2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HK5CG4Q>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABAO5Z364SUQQHGHAKMJGSTQJHW4ZANCNFSM4IWAKJEQ>
.
|
It does not, sadly. That's a surprisingly-rare feature in the JavaScript testing ecosystem; I've searched around. See jestjs/jest#8317 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some Object prototype properties are overridden by the classes that inherit from the Object prototype, and TypeScript has not reflected all of these overridden properties in their respective types. Specifically:
are all missing
toString
in their properties. We commented on this bug on TypeScript to call attention to the absence, and will be tracking the issue. For now testing of Object prototype properties will be done with the assumption that the above are not overridden - with documentation outlining the situation, and code that will start to fail when TypeScript is updated.The text was updated successfully, but these errors were encountered: