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

Refactor test: use Builder pattern to create input and expected output #365

Open
mylinhdao opened this issue May 23, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@mylinhdao
Copy link
Collaborator

mylinhdao commented May 23, 2024

We have many snapshot tests where each snapshot is a string of a metric object. This makes the changing of those snapshots inconvenient, for example: Changing the variable name of the metric object means searching for that variable and change every single one of them.

A better solution can be: using the builder pattern to create the expected output.

We can use this pattern to create the input, too, so units tests can be written (currently, we use files as input to write integration tests).
Note: we might need to change our function signatures to to this.

@mylinhdao mylinhdao added the enhancement New feature or request label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant