To allow at least some official adoption of unit testing of Arduino, I have asked several upstream discussion areas about amending the library specification. The goal would be to standardize the test/
directory as one that does not contain any code files (as far as the compiler is concerned, when using a library as a dependency), and also so the Arduino IDE itself doesn't complain about the directory being unexpected in some way.
Here's where I raised those issues:
This ticket is just to (locally) track if/when that gets resolved.