Hey,
I just learnt that assertions in Godot are automatically removed from the final product. As I am more used to separate Test files I wonder what the best practices in Godot are.
Should I spread my assertions across my implementations to ensure I test everything on the spot or should I create separate test files and exclude them later on manually?
Both options seem to have their benefits like ...
- ... having everything in one spot makes it easy to see check everything is tested properly and allows for catches in actual scenes ...
- ... having everything in separate files keeps the code clean and easy to read ...
... as well as downsides ... - ... certain tests might require specific instantiation or rare edge cases that rarely come up during play.
- ... separate tests might not catch cases I have not though of and will only encounter in an actual scene.
As I don't have much experience with inline-asserts I would like to know if there is any established standard and what you personally prefer and why.