Skip to content
This repository was archived by the owner on Sep 27, 2020. It is now read-only.

Commit 14505da

Browse files
committed
fix: adjustment output
1 parent 58abf69 commit 14505da

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

jsonequal/fail.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ func FailJSONDiff(
3636
diff, s := jsondiff.Compare(lb, rb, &options)
3737
prefix := c.Prefix
3838
c.Prefix = "\n"
39-
return fmt.Errorf("%s (status=%s)\n%s\n%s", prefix, diff.String(), s, FailPlain(c, left, right, lb, rb).Error())
39+
return fmt.Errorf("%sstatus=%s\n%s\n%s", prefix, diff.String(), s, FailPlain(c, left, right, lb, rb).Error())
4040
}

try/try.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ func (it It) With(
5151
}
5252

5353
mismatch := jsonequal.ShouldBeSame(
54-
jsonequal.From(actual),
5554
jsonequal.From(it.Want),
56-
jsonequal.WithPrefix("jsondiff, got and want is not same."),
57-
jsonequal.WithLeftName("left (got) "),
58-
jsonequal.WithRightName("right (want) "),
55+
jsonequal.From(actual),
56+
jsonequal.WithPrefix("jsondiff, got and want is not same.\n"),
57+
jsonequal.WithLeftName("left (want) "),
58+
jsonequal.WithRightName("right (got) "),
5959
)
6060
if mismatch != nil {
6161
t.Errorf("%s", mismatch)

0 commit comments

Comments
 (0)