Skip to content
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

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

vCaisim
Copy link
Collaborator

@vCaisim vCaisim commented Dec 30, 2024

No description provided.

Copy link

wallClockEndedAt: endTime.toISOString(),
wallClockDuration: durationMillis,
},
tests: testcases?.map((test) => {
accTestTime += timeToMilliseconds(testcases[0]?.time);
if (testcases[0]?.time) {
Copy link
Collaborator Author

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.

Copy link
Contributor

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();
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

Copy link
Contributor

@miguelangaranocurrents miguelangaranocurrents left a 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!

@ynahmany ynahmany merged commit 8f53d25 into main Jan 2, 2025
4 checks passed
@ynahmany ynahmany deleted the fix/date-handling branch January 2, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants