Skip to content

Expand t.Fatal(err) to include more debugging information #66

Open
@minusnine

Description

@minusnine

Go style best practices dictate that test failures should be useful.

https://github.com/golang/go/wiki/CodeReviewComments#useful-test-failures

In most cases, the error message should include:

  • The function that failed.
  • The inputs to the function.
  • The output of the function
  • For at least non-error types, the expected value.

We should audit and expand the errors in remote_test.go to ensure each failure is handled. In particular, the errors like:

title, err := wd.Title()
if err != nil {
  t.Fatal(err)
}

Should be expanded like:

title, err := wd.Title()
if err != nil {
  t.Fatalf("wd.Title() returned error: %v", err)
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions