Skip to content

feat: simplify mock handling #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2024
Merged

feat: simplify mock handling #190

merged 1 commit into from
Oct 14, 2024

Conversation

smlx
Copy link
Owner

@smlx smlx commented Oct 14, 2024

mockgen generated mocks are now expected to be:

  • in the same directory as the _test.go files
  • suffixed _mock_test.go, so they are handled correctly by the go
    tooling (ignored during build, coverage calculation etc.)
  • in the same package as the _test.go files

mockgen generated mocks are now expected to be:

* in the same directory as the _test.go files
* suffixed _mock_test.go, so they are handled correctly by the go
  tooling (ignored during build, coverage calculation etc.)
* in the same package as the _test.go files

Example:

  mockgen -source=foo.go -package=foo_test -destination=foo_mock_test.go -write_generate_directive
@smlx smlx merged commit 9539c92 into main Oct 14, 2024
11 checks passed
@smlx smlx deleted the simplify-mock branch October 14, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant