mockery
mockery copied to clipboard
Combined inpackage mocks into one file
I currently use
mockery -all -inpkg -testonly -case underscore
It generates a mock of every interface in my package for unit test purposes. Some code in the package accepts interfaces defined in the same package so it helps to test.
However, this generates a large amount of mock_.._test.go files. Just wondering if there could be an option to combine all mocks into a single file?
Thanks!
I'd say this should be possible, but I don't think I want to introduce it in v2. I'm trying to freeze most new feature requests until the codebase can get into a better/more manageable state (which will be v3).
waiting for this too :)
Do we have any news on this topic? This would be extremely helpful 😢
Note: this is still on my radar and I do want to support this. The priority now is getting the packages feature into a production-ready state. Once that's done, I can focus my attention on this.
Assume that this is same issue where we try to generate several interfaces in the same file but as a result it has only one of them. Right?