fix: some bug
This commit is contained in:
@@ -18,12 +18,14 @@ func TestParseRecipe_Golden(t *testing.T) {
|
||||
t.Fatalf("ParseFile: %v", err)
|
||||
}
|
||||
|
||||
gotMap := got.(map[string]any)
|
||||
|
||||
var want map[string]any
|
||||
if err := json.Unmarshal(output, &want); err != nil {
|
||||
t.Fatalf("unmarshal expected.json: %v", err)
|
||||
}
|
||||
|
||||
if diff := cmp.Diff(want, got); diff != "" {
|
||||
if diff := cmp.Diff(want, gotMap["data"]); diff != "" {
|
||||
t.Fatalf("JSON mismatch (-want +got):\n%s", diff)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user