Is it possible to generate the same mock in multiple directories? #793
-
When using mockery.yaml, we can specify the output directory of an interface mock by setting config.dir to the desired path. I'm trying to find a way to output said mock to multiple directories in my application. Tried using a list of paths in the config.dir but without success. Is that even possible? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes! I do believe this is possible. https://vektra.github.io/mockery/latest/features/#examples There is a |
Beta Was this translation helpful? Give feedback.
-
Tried and it works! Thanks a lot for the quick response. |
Beta Was this translation helpful? Give feedback.
Yes! I do believe this is possible. https://vektra.github.io/mockery/latest/features/#examples
There is a
configs
section you can specify (contrasted toconfig
) that takes a list of config mappings. If you specify a different directory for each instance of the output mock, it should work.