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
I don't know for sure what the expected value of util.convert("1198908717056", "Date") is, but I suspect that this test case assumes that it should be equal to util.convert(1198908717056, "Date") .
Expected behaviour
When checking Date parsing outputs, we need to check that the output is actually a valid date.
Checking this via .valueOf() and !isNaN() might be a good approach.
Also, I'm right about this, then fixing this test case means adding failing test cases, which breaks the build.
This implies that the parser needs to be fixed to accept strings, or that this test case was never correct.
Environment
Chrome, Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
Migrated from #663 (comment)
Changing these test-cases raised another concern:
I'm not convinced that the
instance of Date
operation is actually robust enough to correctly test for valid parsing:vis-timeline/test/util-convert.test.js
Lines 48 to 50 in f95eb73
Interactively (via devtools) i found
I don't know for sure what the expected value of
util.convert("1198908717056", "Date")
is, but I suspect that this test case assumes that it should be equal toutil.convert(1198908717056, "Date")
.Expected behaviour
When checking Date parsing outputs, we need to check that the output is actually a valid date.
Checking this via
.valueOf()
and!isNaN()
might be a good approach.Also, I'm right about this, then fixing this test case means adding failing test cases, which breaks the build.
This implies that the parser needs to be fixed to accept strings, or that this test case was never correct.
Environment
Chrome, Ubuntu 18.04
The text was updated successfully, but these errors were encountered: