I have recently learned about 'flattening' structs in files - removing the pub const <name> = struct { bit - and then giving it a name via const <name> = @This();
I like this a lot. However, I have tests at the bottom of the file that are now also imported, and are run when I call Zig test on the importing file.
To clarify, a simplified case:```// file_1 imports file_2
// file_1 has 1 test; file_2 has 2 tests
zig test file_1
All 3 tests pass```
What is the proper way to handle this? Should I move the tests for file_2 into a separate file, or is it generally fine to run both files' tests together? How do you all handle this situation?
Your advice is appreciated 🙂