mock icon indicating copy to clipboard operation
mock copied to clipboard

doesn't match the argument at index 0 - context.background.withcancel.withcancel

Open jslota-rt opened this issue 3 years ago • 1 comments

Hello I am seeing an issue when trying to mock a method and not sure how to solve. Its a very simple error, but sort of says I'm getting the same thing, was hoping here would be a good place to ask

doesn't match the argument at index 0.
        Got: context.Background.WithCancel.WithCancel (*context.cancelCtx)
        Want: is equal to context.Background.WithCancel.WithCancel (*context.cancelCtx)

jslota-rt avatar Jan 18 '22 23:01 jslota-rt

comparing two non-nil functions always returns false. Ref: https://github.com/golang/go/blob/86b5f6a7be707b9d84108df6f459c7e84bf9dbac/src/reflect/deepequal.go#L186

phamh79 avatar Mar 03 '22 10:03 phamh79