Generated mock does not properly import dependent structs. #783
-
What setting do I need to use for the config to include dependent struct needed by the interface? Previous I was using the following command |
Beta Was this translation helpful? Give feedback.
Answered by
LandonTClipp
Jun 5, 2024
Replies: 1 comment 9 replies
-
You seem to be wanting to place mocks adjacent to your interface. Did you try: https://vektra.github.io/mockery/latest/configuration/#__tabbed_1_2 ? |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to delete
inpackage: True
from all your config. This parameter tells mockery whether it should be importing your package-local types or not. You have informed it that you placed the mock in the same package that your types are defined, thus it believes it shouldn't import them.