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

[tests-only] throw an exception on uhandled exception in unit tests #6415

Merged
merged 2 commits into from
Feb 11, 2022

Conversation

individual-it
Copy link
Member

@individual-it individual-it commented Feb 10, 2022

Description

Related Issue

Motivation and Context

don't allow crap tests

How Has This Been Tested?

  • 🤖

Screenshots (if appropriate):

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)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@kulmann
Copy link
Contributor

kulmann commented Feb 10, 2022

Uff... good spot. Do you have an idea / a plan how to proceed from here? Skip the respective tests in this PR and fix them in separate PRs? Probably easier than keeping this open until the tests are fixed / modified / deleted / ... ?

@individual-it
Copy link
Member Author

@kulmann I have today half a day to work on it, let me see how many of the actual issues I can fix

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@individual-it
Copy link
Member Author

@kulmann it turned out to be an easy task after I found a place where @files/src/composables was mocked, THX to @janackermann for that good example

I've put the mock into jest.init.js, alternatively we can place it in every file where its needed and would not need jest.unmock('@files/src/composables') in [usePagination.spec.ts](https://github.com/owncloud/web/pull/6415/commits/26b826b11ec85247f4a4d45d98a3c6ac77085292#diff-04163efa678b56879e33803c560c520c412cb0dda7ac0b0e291d134b27a845d8)

So we can merge this PR, it's not blocked anymore

Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

🤩

@kulmann kulmann merged commit 5eac47f into master Feb 11, 2022
@delete-merged-branch delete-merged-branch bot deleted the unhandledException branch February 11, 2022 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants