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
Currently, the goss add command does a great job at capturing by default an array of trimmed strings to match. But this can not be used for approval testing commands that produce yaml.
Describe the solution you'd like
A new --exact-match option to "goss add command" to perform exact multi-line matches
Describe alternatives you've considered
wrap goss add with a script which would replace using yq the command.cmd.stdout
The text was updated successfully, but these errors were encountered:
Describe the feature:
Enable
goss add command
to capture stdout/stderr as a multiline scriptThis enables to capture & then validate various multiline outputs that are sensitive to space and linefeed (typically yaml output).
This is useful in the test approach sometimes called golden master testing / approval testing/ Characterization tests
see https://en.wikipedia.org/wiki/Characterization_test
Here is a sample library that that supports such practice https://approvaltests.com/
Currently, the
goss add command
does a great job at capturing by default an array of trimmed strings to match. But this can not be used for approval testing commands that produce yaml.Describe the solution you'd like
A new --exact-match option to "goss add command" to perform exact multi-line matches
Describe alternatives you've considered
wrap
goss add
with a script which would replace using yq thecommand.cmd.stdout
The text was updated successfully, but these errors were encountered: