mock icon indicating copy to clipboard operation
mock copied to clipboard

GoMock is a mocking framework for the Go programming language.

Results 86 mock issues
Sort by recently updated
recently updated
newest added

### Requested feature A function to make a reference of a call into a call variable: ```go func Ref(dest **gomock.Call, call *gomock.Call) *gomock.Call { *dest = call return call }...

type: feature request

The following changes InOrder to return the last called Call. This allows a more fluent design when using InOrder, things can be better chained together and allows composing of numerous...

type: feature request
status: v2

*Requested feature* Document _why_ a user should choose the source or reflect mode. *Why the feature is needed* The README states: > mockgen has two modes of operation: source and...

status: needs discussion
type: docs

I've been trying to use the gomock to perform some table driven testing. I need to be able to change the expected return values based on permutations of different errors...

type: docs

# Current state The gomock framework causes a deadlock when a call is made on a mock from within a goroutine when using testing.T as the TestReporter. This is because...

status: backlog

@plakhotnii @codyoss `go list` is quite slow because it has to download external dependencies. This becomes more problematic under Bazel execution environment when GOCACHE is not available (https://github.com/bazelbuild/rules_go/issues/2366). I found...

type: feature request

We should update the docs to include best practices for how to handle advanced mocking scenarios like those mentioned in #352

type: docs

https://github.com/golang/mock/blob/112dfb85f71efc679eef2a9763162fa83fbee449/gomock/call.go#L184 If someone uses Return with an interface slice, like `.Return(rets...)`, this line mutates the caller's slice. **How** it mutates it is semi-harmless, usually, but rather importantly this means tests...

type: feature request
status: backlog

There are a few features that would be best if they were opt in, whether this be for backwards compatibility or simply preference. An established pattern for configuring something beyond...

type: feature request
status: v2