Skip to content

Commit

Permalink
chore: formatting improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Jan 17, 2024
1 parent 882f10e commit 4b455f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions internal/cli/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ func runExecute(cmd *cobra.Command, opts executeOptions) error {
cmd.Printf("%s: %s\n", opts.Colors.Red.Render("Description"), re.Metadata.Description)
}

cmd.Println()

// Load all existing sauces
existingSauces, err := recipe.LoadSauces(opts.Dir)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion internal/cli/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func runTest(cmd *cobra.Command, opts testOptions) error {
return nil
}

cmd.Printf("Running tests for recipe \"%s\"...\n", re.Name)
cmd.Printf("Running tests for recipe \"%s\"...\n\n", re.Name)
errs := re.RunTests()
for i, err := range errs {
symbol := '✅'
Expand All @@ -163,6 +163,7 @@ func runTest(cmd *cobra.Command, opts testOptions) error {
}

if len(formattedErrs) > 0 {
cmd.Println()
return fmt.Errorf("recipe tests failed: %w", errors.Join(formattedErrs...))
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/recipe/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (re *Recipe) RunTests() []error {
continue
} else {
if !bytes.Equal(tFile.Content, file.Content) {
errors[i] = fmt.Errorf("%w: file '%s'.\nExpected:\n%s\n\nActual:\n%s", ErrTestContentMismatch, key, tFile, file.Content)
errors[i] = fmt.Errorf("%w: file '%s'.\nExpected:\n%s\n\nActual:\n%s", ErrTestContentMismatch, key, tFile.Content, file.Content)
continue
}
}
Expand Down

0 comments on commit 4b455f6

Please sign in to comment.