-
Notifications
You must be signed in to change notification settings - Fork 58
Reevaluate module testing #117
Comments
To do a small kick-off: Another step might be to compare files stripped of whitespace, newlines and comments. That makes changes less tedious (i.e. and enter here and there does no longer lead to failing tests. |
@Remco75 I think it would be a little risky to depend on the functionality of the module for the testing of the rest of the module, if I'm understanding you're suggestion. Going off of your second suggestion, we might be able to utilize the diff module to make comparisons. Things like |
@noahdietz , yeah, that was what I meant. I is a bit shady indeed, although we would test the templatesPath functionality very well then ;-) But I agree it's a bit shady. We could overwrite the outerDescribe template with a custom , almost empty template before running the test. But that is also not very clean. Using the diff module seems feasible, and a good plan! |
ok, I was thinking about this a bit more now that i'm more acquainted with the codebase. I think is we try to seperate the logic (preparing the data), and rendering (templates + templates functions) more we gain a lot.
I think we can keep the 'full render tests' very limited, as long as we test the units very properly. |
@Remco75 brought up the fact that it is quite laborious to make changes to this module because then it needs to be propagated across 10s of diff comparison files. This is not a new deficiency, it is well known (@mm-gmbd and I both know the pains), but it is one that is time consuming to tackle.
Let us brainstorm a better way to test this modules functionality, and subsequently make it easier to maintain and contribute to!
The text was updated successfully, but these errors were encountered: