-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cannot read property 'toUTCString' of undefined #716
Comments
Yeah, sorry I've fixed it as well, just forgot to update the issue. I think
that was the main issue but anyway using momentjs was a good solution on my
case. Thanks
…On 5 December 2016 at 15:00, Brandon Dail ***@***.***> wrote:
@ummahusla <https://github.com/ummahusla> looking at your test case,
message is an array with a single object, but in your beforeEach hook
you're treating it as an object (message.date instead of message[0].date),
so I would expect message.toString and message.toUTCString to be undefined
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#716 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACayoOsZeA4qmleUc1GqmdOVWuk-_teZks5rFCclgaJpZM4LEIkQ>
.
|
You were passing a string as a date, and the prop expected a date object. |
Sorry, I deleted my comment that @ummahusla was responding to.
|
@aweary Nah it's okay, it was my bad there. Didn't spot it at first and later on forgot to close the issue here. |
I testing out one of the react components and came across a weird issue. When I try to shallow the component, I get
"before each" hook: Cannot read property 'toUTCString' of undefined
. It's clearly something I not expect.I've done a small researched and I found that a lot of people were struggling with
toString()
method as well and seems to be fixed, but issuetoUTCString()
with still exists.Issues: #519, #453, etc..
Update: I've tried to replace
toUTCString
withtoString
still got the same issueTypeError: Cannot read property 'toString' of undefined
.Component
Test
The text was updated successfully, but these errors were encountered: