Skip to content

Move types into their tests #228

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

Conversation

GuillaumeGomez
Copy link
Collaborator

It's frequent to copy-paste an existing test and its associated (template) type to create a new test. But it's also very possible to use the wrong (template) type from there. Moving the (template) type directly into its test function greatly limit this possibility and it's something that we both started to do recently so with this PR, everything else is moved to this way of writing tests. :)

Copy link
Member

@Kijewski Kijewski left a comment

Choose a reason for hiding this comment

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

Thank you! As you said, it's much easier to read this way, and more difficult to get wrong when you copy a test!

@Kijewski Kijewski merged commit 9718aca into askama-rs:master Nov 9, 2024
34 checks passed
@GuillaumeGomez GuillaumeGomez deleted the move-templates-inside-test branch November 10, 2024 10:24
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