Skip to content

Commit

Permalink
Merge pull request #642 from k1LoW/fix-nan
Browse files Browse the repository at this point in the history
If coverage cannot be collected, report an error.
  • Loading branch information
k1LoW authored Oct 13, 2023
2 parents 8264a0a + 7205e5d commit 21f5af9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/coverage.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ package cmd
import (
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"os"
Expand Down Expand Up @@ -158,6 +159,9 @@ var coverageCmd = &cobra.Command{
if flgs.Debug {
cmd.Println()
}
if len(coverages) == 0 {
return errors.New("could not find any specs")
}
table.Rich([]string{"Total", fmt.Sprintf("%.1f%%", float64(covered)/float64(total)*100)}, []tablewriter.Colors{{}, {}})
for i, v := range coverages {
table.Rich(v, colors[i])
Expand Down
2 changes: 1 addition & 1 deletion testdata/book/cookie_in_requests_automatically.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vars:
cookie:
key: "cookie-name"
value: "cookie-value"
debug: ${DEBUG:-true}
debug: ${DEBUG:-false}
steps:
bindUuid:
desc: UUIDs are numbered in the image of a session.
Expand Down

0 comments on commit 21f5af9

Please sign in to comment.