Skip to content

Commit

Permalink
Removing empty (errored) generated svgs
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Jan 16, 2024
1 parent 08d366a commit a90d734
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 2 deletions.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file removed testdata/vega/clock.vg.json.svg
Empty file.
Empty file.
Empty file removed testdata/vega/pacman.vg.json.svg
Empty file.
Empty file.
Empty file removed testdata/vega/watch.vg.json.svg
Empty file.
Empty file.
6 changes: 4 additions & 2 deletions vegagoja_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ func testRender(t *testing.T, ctx context.Context, testName, name string, timeou
t.Logf("---\n%s\n---", s)
}
t.Logf("duration: %s", total)
if err := os.WriteFile(name+".svg", []byte(s), 0o644); err != nil {
t.Fatalf("expected no error, got: %v", err)
if s = strings.TrimSpace(s); len(s) != 0 {
if err := os.WriteFile(name+".svg", []byte(s), 0o644); err != nil {
t.Fatalf("expected no error, got: %v", err)
}
}
}

Expand Down

0 comments on commit a90d734

Please sign in to comment.