I was researching the source code of ExUnit and found that when ExUnit starts automatically it runs inside System.at_exit/1.
I am wondering what was the purpose of it. What benefits does it give?
Even in docs: “Starts ExUnit and automatically runs tests right before the VM terminates.”
Link to this function https://github.com/elixir-lang/elixir/blob/main/lib/ex_unit/lib/ex_unit.ex#L194