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

gomock caller.SetArg recognizes variadic pointer parameter as a single param ## Code example ```// Some Sample Function func (p *pkg) VariadicInterface(data ...interface{}) { for i := range data { data[i]...

help wanted
type: feature request

## Requested feature Ability to disable the automatic call to `Controller.Finish`, such that the test does not fail if expected mocked calls are not made. ## Why the feature is...

type: feature request

It's not always obvious how `mockgen`-generated code has been created, particularly when coming to it without prior knowledge of it. Good practice would be to include a `go:generate` directive that...

help wanted
type: feature request

I am encountering an issue mocking method calls with a functional argument. It appears that gomock is not matching the argument, and so failing with an unexpected call. Tests are...

type: feature request
status: backlog

### Description I think it would be nice to build an `ArgumentCaptor` interface and `argumentCaptor` struct that extends `Matcher` through composition, but store the value of the arguments before the...

status: needs discussion
type: feature request
proposal

If I derive a type from a core type and use that in my expectations, tests start failing where they didn't before, even where the inputs have not changed. I've...

help wanted
type: feature request

*Requested feature* I am not sure if GoMock supports this natively or not.  If it does, it would be nice if the documentation reflected how to do interaction testing more...

status: needs discussion
type: feature request

```go type IMQ interface { Publish(channel string, message interface{}) error Subscribe(channel string, message chan SetArg(1, ...) referring to argument of non-pointer non-interface non-slice type chan

help wanted
type: feature request

Mockgen can't generate mocks for interfaces whose method param or return types are unnamed non-empty structs. For example: Suppose I have a `foo.go` file whose package import path is `foo`:...

help wanted
type: feature request

# Requested Feature It would be nice to have a way to re-use a mock controller across multiple different tests. Currently, the docs for Controller have this to say on...

type: feature request