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

MM-59579 Add tests for utils/server #8456

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Conversation

jwilander
Copy link
Member

Summary

Increase test coverage of utils/server to 90.66%.

Ticket Link

https://mattermost.atlassian.net/browse/MM-59579

Checklist

  • Added or updated unit tests (required for all new features)
  • Has UI changes
  • Includes text changes and localization file updates
  • Have tested against the 5 core themes to ensure consistency between them.
  • Have run E2E tests by adding label E2E iOS tests for PR.

Device Information

This PR was tested on: n/a

Screenshots

n/a

Release Note

NONE

@jwilander jwilander added the 2: Dev Review Requires review by a core commiter label Jan 7, 2025
@jwilander jwilander requested review from Willyfrog and pvev January 7, 2025 20:30
await loginToServer(theme, serverUrl, displayName, configWithSingleSSO, license);

expect(showModal).toHaveBeenCalledWith(Screens.SSO, '', expect.any(Object), expect.any(Object));
});*/
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to file a ticket to look into this one. It's a bit too dangerous of code for me to touch without the full context.

Copy link
Contributor

@pvev pvev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks @jwilander


describe('loginOptions', () => {
it('should return correct login options', () => {
const config = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we should have a test helper that gives us back the base config and license objects.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It hasn't come up too often so far when writing tests but definitely something we should consider if we find ourselves defining the config/license from scratch often

@jwilander jwilander added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Jan 8, 2025
@jwilander jwilander merged commit 1bb024e into main Jan 8, 2025
30 checks passed
@jwilander jwilander deleted the mm-59579_utils-server-tests branch January 8, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants