Skip to content

Conversation

h
Copy link

@h h commented Aug 21, 2020

It's a bit dangerous that chevron doesn't raise an error by default when a template specifies keys that don't exist in the template data. This means that unit tests will generally not catch the error when a variable is mis-typed, or forgotten entirely in the template data.

@joshhansen Issuing a warning for these errors is quite helpful, thank you! But it's not sufficient for testing templates in a unit test. The library really needs to raise an error in order to be useful in unit tests.

@h
Copy link
Author

h commented Oct 28, 2022

@joshhansen Any chance you could review this PR? I submitted it over 2 years ago and would love to close it out. Thanks!

@joshhansen
Copy link
Owner

Hey @h, thanks for your interest! My master_warn branch got merged into the main noahmorrison/chevron repository as part of their 0.14.0 release. This fork is really here for historical purposes only - it was just my platform for submitting that pull request about warnings. As that meets my needs, I suggest you either take up this further improvement in the upstream repo, or make your own fork of that repo to implement this behavior. Looks like there may be other efforts there already to go in a similar direction, see noahmorrison#109

Best of luck!

@joshhansen joshhansen closed this Oct 31, 2022
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