Where is `std.testing.init`/`std.testing.environ`?

The most primitive logic fails here looking at std.testing.io/std.testing.allocator.

what should they contain?

that would be another topic. for now i could use an empty struct instead of writing a mocking framework…

so make an empty struct!

the reason i ask is because i can’t think of any sensible default, so i don’t know why std.testing should provide them.

i cannot just “create” one: Now, environment variables are available only in the application's main function. sourcing env vars from any other place would be a hack.

a test case name sounds like a good start for test env set

sounds like your tests are testing at the wrong level of abstraction.

i don’t really test anything inside environ, i just need it for posterity. it is surprising that i have to do the mocking on my own after how env vars were presented.

std.testing.environ and testing: ability to read environment variables from unit tests

1 Like

oh swell, thanks