Skip to content
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

tests(v3): add tests for template funcs #918

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

ravsii
Copy link
Contributor

@ravsii ravsii commented Feb 13, 2025

Description

Added tests for template functions, did some refactor of existing ones as well.

Version of Go used when building/testing:

  • 1.22
  • 1.23

How Has This Been Tested?

Added tests

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

return Data{Mocks: []MockData{{
TypeParams: []TypeParamData{{
ParamData: ParamData{
Var: &Var{Name: "t", typ: &types.Slice{}},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't find a better type that implements that interface, and I can't change the underlying type of a slice element, so it's []<nil> in the tests

@ravsii
Copy link
Contributor Author

ravsii commented Feb 13, 2025

Also, I think it's time to add 1.24 to the pipeline

@LandonTClipp
Copy link
Collaborator

Awesome this is great! Thanks. I will take a closer look later.

Copy link
Collaborator

@LandonTClipp LandonTClipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great, no comments at all. Love how clean it all is :D

Thanks again.

@LandonTClipp LandonTClipp merged commit 0be3517 into vektra:v3 Feb 18, 2025
4 checks passed
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.

2 participants