Skip to content

Tool tests could be a bit more strict in their assertions #83

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

Open
williammartin opened this issue Apr 3, 2025 · 1 comment
Open

Tool tests could be a bit more strict in their assertions #83

williammartin opened this issue Apr 3, 2025 · 1 comment
Labels

Comments

@williammartin
Copy link
Collaborator

Description

On #82 (comment), I was surprised to see that my mistake did not result in a failing test. On closer inspection, it appears that there is no assertion that we call the API with the expected values, only stubbing a response value:

mock.WithRequestMatchHandler(
mock.PostReposIssuesByOwnerByRepo,
mockResponse(t, http.StatusCreated, mockIssue),
),

We should maybe look to tighten these tests up a bit, it would be very easy to break the tool implementations without knowing.

@williammartin
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants