You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 themetric
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.
The text was updated successfully, but these errors were encountered: