File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ Every subsequent test run will compare the actual value against the inline snaps
325325 - ` Width ` : The maximum width in characters before wrapping json output (default: 80)
326326 - ` Indent ` : The indentation string to use for nested structures (default: 1 spaces)
327327 - ` SortKeys ` : Whether to sort json object keys alphabetically (default: true)
328+ - a label to add to the end of snapshot ids, to help when reviewing ` snaps.Label("stdout") `
328329- a custom serializer function for non-structured snapshots ` snaps.Serializer(func(any) string {...}) `
329330- a helper serializer function ` snaps.Raw() ` that uses ` fmt.Sprint ` to serialize the value as is without any formatting or indentation.
330331
@@ -336,6 +337,7 @@ t.Run("snapshot tests", func(t *testing.T) {
336337 snaps.Dir (" my_dir" ),
337338 snaps.Filename (" json_file" ),
338339 snaps.Ext (" .json" ),
340+ snaps.Label (" JSON" ),
339341 snaps.Update (false ),
340342 snaps.Serializer (func (v any) string {
341343 // custom serializer logic
You can’t perform that action at this time.
0 commit comments