-
Notifications
You must be signed in to change notification settings - Fork 1
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
[CSR-2001] fix: ensure date values are properly handled #116
Conversation
wallClockEndedAt: endTime.toISOString(), | ||
wallClockDuration: durationMillis, | ||
}, | ||
tests: testcases?.map((test) => { | ||
accTestTime += timeToMilliseconds(testcases[0]?.time); | ||
if (testcases[0]?.time) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miguelangaranocurrents please confirm that this is working as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is working as expected
return 0; | ||
export function getTimestampValue(dateString: string) { | ||
if (!isValidDate(dateString)) { | ||
return new Date().getTime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return current timestamp instead of 0 if the date string is not a valid date
const testcases = ensureArray<TestCase>(suite.testcase); | ||
|
||
let accTestTime = 0; | ||
|
||
const passes = testcases.filter( | ||
(tc) => (tc.failure ?? []).length === 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failure
is of type (string | Failue)[] | undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is looking good to me, great work!
No description provided.