Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ func (m *Mock) TestData() objx.Map {
*/

// Test sets the test struct variable of the mock object
// Test should not be called on an object that is going to be used in a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add a . on the previous sentence:
image

Copy link
Collaborator

@brackendawson brackendawson Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While here, we might improve the existing doc?

// Test sets the [TestingT] on which errors will be reported, otherwise errors will cause a panic.

// goroutine other than the one running the test function.
func (m *Mock) Test(t TestingT) {
m.mutex.Lock()
defer m.mutex.Unlock()
Expand Down
2 changes: 2 additions & 0 deletions require/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
//
// The `require` package have same global functions as in the `assert` package,
// but instead of returning a boolean result they call `t.FailNow()`.
// A consequence of this is that it must be called from the goroutine running
// the test function, not from other goroutines created during the test.
//
// Every assertion function also takes an optional string message as the final argument,
// allowing custom error messages to be appended to the message the assertion method outputs.
Expand Down