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

Test user provided execute implementations #9

Open
crhntr opened this issue Aug 24, 2024 · 0 comments
Open

Test user provided execute implementations #9

crhntr opened this issue Aug 24, 2024 · 0 comments
Labels

Comments

@crhntr
Copy link
Owner

crhntr commented Aug 24, 2024

Users of muxt can bring their own execute function.
We should have some expectations for what these functions do.

For example they should not call WriteHeader if they are passed
the value false for parameter writeHeader.

Given I import "GitHub.com/crhntr/muxt/muxttest" into my test package
And I call `muxttest.Execute(t, execute)`
And `execute` matches expectations for a user provided execute func
When I run `go test`
Then the tests pass

Maybe this is doing too much. Unfortunately this design would require
the library to import muxt. I don't like that. So maybe we should generate tests instead.

@crhntr crhntr added enhancement New feature or request developer-experience labels Aug 24, 2024
@crhntr crhntr changed the title Add package muxttest and add a function to test execute definitions Test user provided execute implementations Aug 30, 2024
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

1 participant