Skip to content

Commit

Permalink
fix typos in test names
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Nov 28, 2024
1 parent 399ca35 commit aeb1817
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion command/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

// This test asserts the proper behaviour for `line_ending` settings specified
// in formatter settings overriding the global configuration.
func TestLineEndingFormatterVsGloabl(t *testing.T) {
func TestLineEndingFormatterVsGlobal(t *testing.T) {
c := &Command{
Config: &Config{
LineEnding: "lf",
Expand Down
8 changes: 4 additions & 4 deletions internal/assert/assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
NilErrMessage = "expected no error, got error:\n%v"

// The failure format string if the err is nil.
NotNilErrMesage = "expected an error, got nil"
NotNilErrMessage = "expected an error, got nil"

// The failure format string for slices being different sizes. Formatted with `expected` then `got`.
SliceSizeMessage = "slices were different sizes.\nexpected len:%d\n got len:%d\n"
Expand Down Expand Up @@ -69,16 +69,16 @@ func DereferenceEqual[T comparable](t TestingT, expected *T, got *T) {
DereferenceEqualMsg(t, expected, got, DereferenceEqualErrMsg, EqualMessage)
}

// Assert that that `err` is nil. Uses `assert.NilErrMessage`.
// Assert that `err` is nil. Uses `assert.NilErrMessage`.
func NilErr(t TestingT, err error) {
t.Helper()
Assert(t, err == nil, NilErrMessage, err)
}

// Assert that that `err` is not nil. Uses `assert.NotNillErrMesage`.
// Assert that `err` is not nil. Uses `assert.NotNillErrMessage`.
func NotNilErr(t TestingT, err error) {
t.Helper()
Assert(t, err != nil, NotNilErrMesage)
Assert(t, err != nil, NotNilErrMessage)
}

// Assert that slices `got` and `expected` are equal. Will produce a
Expand Down
2 changes: 1 addition & 1 deletion internal/assert/assert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestDereferenceEqualErr(t *testing.T) {
}
}

func TestDerefenceEqualFail(t *testing.T) {
func TestDereferenceEqualFail(t *testing.T) {
testInstance := newTMock()
type x struct {
num int
Expand Down

0 comments on commit aeb1817

Please sign in to comment.