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

[Vue] Suppress unit test warnings #1335

Merged
merged 7 commits into from
Feb 15, 2023
Merged

Conversation

addy-pathania
Copy link
Contributor

@addy-pathania addy-pathania commented Feb 10, 2023

Clear unit test warning on console for sitecore-jss-vue package by mocking warn.

Description / Motivation

Testing Details

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@addy-pathania addy-pathania requested a review from a team February 10, 2023 22:23
Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

I would suggest you to check how to add an additional pre-setup script (jest provides configuration) and mock warn in a one place. And I think that we don't need to fully disable warn, let's disable only specific message which is impossible to fix

@illiakovalenko
Copy link
Contributor

@sc-addypathania Could you, please, mock only specific message that you would like to hide?

@addy-pathania
Copy link
Contributor Author

addy-pathania commented Feb 14, 2023

@sc-addypathania Could you, please, mock only specific message that you would like to hide?

@illiakovalenko What if there are multiple different warning messages?
Please check the latest commit, if that's what you're referring to.

@illiakovalenko
Copy link
Contributor

@sc-addypathania Did you investigate these warnings? May be some unit tests should be adjusted or it's expected to be in some test cases?

@illiakovalenko illiakovalenko merged commit cabd1e0 into dev Feb 15, 2023
@illiakovalenko illiakovalenko deleted the fix/570254-remove-warnings branch February 15, 2023 15:16
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.

2 participants