When writing a custom formatter, the %ExUnit.TestModule{} struct that is sent as part of the :module_finished cast includes all of the tests in that module, but it does not include the correct run times of those tests. For example, in that message I get:
I would expect that the :time for each test in the test module would be updated to reflect how long the test actually took to run. Essentially, I would expect that the :tests key would be updated to include the new structs that are sent as part of the :test_finished message, so they include the run times of each test and an updated :state of each test, including failure information for failed tests.
@devonestes good catch. Can you please investigate how hard would be to fix this? I think we should be able to return the test results before calling module finished. Thanks!
Environment
Elixir 1.7.1 (compiled with Erlang/OTP 19)
Current behavior
When writing a custom formatter, the
%ExUnit.TestModule{}
struct that is sent as part of the:module_finished
cast includes all of the tests in that module, but it does not include the correct run times of those tests. For example, in that message I get:Expected behavior
I would expect that the
:time
for each test in the test module would be updated to reflect how long the test actually took to run. Essentially, I would expect that the:tests
key would be updated to include the new structs that are sent as part of the:test_finished
message, so they include the run times of each test and an updated:state
of each test, including failure information for failed tests.