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

test: add approval test setup #415

Merged
merged 19 commits into from
Mar 18, 2024

Conversation

subotic
Copy link
Contributor

@subotic subotic commented Mar 10, 2024

related to DEV-3400

Problem Statement

There is a need for refactoring, so that future additions and bugfixes can be applied in a timely manner. The fear is, that although the code will be "only" refactored, that this might break the behavior in unforeseen ways.

Desired Outcome

Have a safety net in place, so that refactoring can be done without fear.

Solution

Add approval tests. Approval tests are a technique to write test, where the output of a action is persisted to disks and subsequent calls are compared to the version stored on disk. Another name is snapshot tests. This technique is usually applied to legacy codebases, where there is not a good unit test coverage and where to add good unit tests, the code needs to be first refactored to make it testable.

Copy link

linear bot commented Mar 10, 2024

@subotic subotic force-pushed the feature/dev-3400-setup-and-add-approval-tests branch from 38b27a5 to a21a5e4 Compare March 10, 2024 17:59
@subotic subotic force-pushed the feature/dev-3400-setup-and-add-approval-tests branch from 50e8433 to 2d46576 Compare March 11, 2024 17:05
@subotic subotic self-assigned this Mar 18, 2024
@subotic subotic marked this pull request as ready for review March 18, 2024 17:53
@subotic subotic merged commit b7afbb6 into main Mar 18, 2024
5 checks passed
@subotic subotic deleted the feature/dev-3400-setup-and-add-approval-tests branch March 18, 2024 20:35
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.

1 participant