Closed podhmo closed 5 years ago
for #18
func TestItWithReplaceMap(t *testing.T) { got := map[string]string{ "name": "foo", "now": rfc3339.Format(time.Now()), } repMap := map[string]interface{}{ "#/now": got["now"], } want := snapshot.Take(t, got, snapshot.WithReplaceMap(repMap)) if err := jsonequal.ShouldBeSame(jsonequal.From(got), jsonequal.From(want)); err != nil { t.Errorf("%+v", err) } }
for #18