You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing I would really be interested in having would be coverage informations for them. I would like to know how much my sample contexts cover all possible branches in my templates.
Thankfully, minijinja being really nicely designed, it seems to already track source spans in the instructions, so it feels like it should mainly be a matter of emitting the spans during instruction evaluation, similar to what is done for the fuel tracker.
I'd be happy to prototype something if you think this feature makes sense. This could be done either by doing coverage tracking within minijinja, or by exposing more internals (looks like exposing a way to read Template.instructions should be enough?) and adding a hook/callback when instructions get evaluated.
The text was updated successfully, but these errors were encountered:
How would you want to export coverage reports? I'm not entirely opposed to it, but this sounds like a niche feature unless there is some really good tooling that this could plug into.
My end goal would be to send that coverage to codecov. I haven't really looked up what the best output format would be
It is indeed probably a niche feature, so maybe a good way for me to able to achieve this would be to expose enough internals (under the unstable_machinery feature?) and hooks so that I can write coverage tooling as an external crate? If you're alright with this approach, I'll try to hack that together, see exactly what's missing
In my project, I've been trying to make sure my templates rendering won't crash at runtime by generating a bunch of sample contexts and render my templates with them in my tests.
One thing I would really be interested in having would be coverage informations for them. I would like to know how much my sample contexts cover all possible branches in my templates.
Thankfully, minijinja being really nicely designed, it seems to already track source spans in the instructions, so it feels like it should mainly be a matter of emitting the spans during instruction evaluation, similar to what is done for the fuel tracker.
I'd be happy to prototype something if you think this feature makes sense. This could be done either by doing coverage tracking within minijinja, or by exposing more internals (looks like exposing a way to read
Template.instructions
should be enough?) and adding a hook/callback when instructions get evaluated.The text was updated successfully, but these errors were encountered: