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

fix(junit): fix locale sensitivity with junit #324

Closed
wants to merge 2 commits into from

Conversation

JonnyPower
Copy link
Contributor

closes #323

What does this PR do?

Changes the start date format util to follow predictable ISO standard

What issues does this PR fix or reference?

#323

Functionality Before

Test summary start date was in use locale

Functionality After

Test summary start date is in ISO format so can be used programmatically later by junit reporter

@JonnyPower
Copy link
Contributor Author

can replicate with this test in junitReporter.test.ts;

  it('should format start time with different locale', () => {
    const modified = { ...testResults };
    modified.summary.testStartTime = `${new Date().toDateString()} ${new Date().toLocaleTimeString(
      'en-CA'
    )}`;
    expect(modified.summary.testStartTime).to.contain('.m.');
    reporter.format(modified);
  });

@shetzel
Copy link
Collaborator

shetzel commented Nov 10, 2023

We should be able to close this since #334 was merged. Thanks for your hard work and patience with this @JonnyPower !

@shetzel shetzel closed this Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test summary start time in locale causes issues with junit reporter
2 participants