Testing Only Code and Dead-Code Elimination

I keep coming back to this after 2 years, but I am still not sure what is most beneficial for the ecosystem. I wish we would align so we do not need to learn new patterns or intended usage across different packages.

  • *.Test*
  • *.TestSupport*
  • .Testing*
  • *Test
  • [Insert N way Here]

There are so many different ways to do this. Aside from this, under what configuration key should we put the “feature flagging” (similar to Rust)?

# or alternative just making a point
config :my_scope, features: [test_support: :disabled]

I am not sure; it sounds like a good idea to me, but plenty of libraries would benefit from shipping with even more testing code included: Assertions, Mockings, Factories, Helpers … so many things