Skip to content

refactor: scale down tests #3997

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

Merged
merged 2 commits into from
Jul 17, 2024
Merged

refactor: scale down tests #3997

merged 2 commits into from
Jul 17, 2024

Conversation

npalm
Copy link
Member

@npalm npalm commented Jul 17, 2024

The test structure and magic for scaling down makes it hard to make any change. This PR refactor the tests cases in suche way

  • only global default mocking
  • per test explicit mocking
  • per test setup test data, avoiding global data mesh

Test coverage is 100% for scale-down.

Note: Codescene warnings are not new, but a bit the fact of how jest works

@npalm npalm requested a review from Brend-Smits July 17, 2024 06:27
Copy link
Member Author

Choose a reason for hiding this comment

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

export two functions for explicit testing

@npalm npalm force-pushed the npalm/scale-down-test-refactor branch from 7481caa to 5eac458 Compare July 17, 2024 06:54
Copy link
Contributor

@stuartp44 stuartp44 left a comment

Choose a reason for hiding this comment

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

LGTM but small changes for typo's

Copy link
Contributor

@stuartp44 stuartp44 left a comment

Choose a reason for hiding this comment

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

LGTM but small changes for typo's

@npalm npalm requested a review from stuartp44 July 17, 2024 09:01
@npalm npalm merged commit c4a7e88 into main Jul 17, 2024
3 of 4 checks passed
@npalm npalm deleted the npalm/scale-down-test-refactor branch July 17, 2024 09:51
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