elixir
elixir copied to clipboard
adds test_pid field in the test metadata
this enhancement adds a test_pid field into the test context metadata. This is useful for backtracking which test is responsible when a ecto sandbox or mox allowance has triggered after the parent test has finished. For now, one will have to write a custom ExUnit.Formatter to take advantage of this extra metadata.
@ityonemo ping in case it fell through the cracks. :)
@ityonemo I've added a test case at https://github.com/ityonemo/elixir/pull/1
I'd love for this to go through so I can use it to print out richer information about sandbox/allowance failures from a custom ex_unit formatter!
Thank you @axelson! Looking at the test you added, I think it would be much simpler to test_pid at the beginning, simpler to use and to test too, so I pushed this change. Thank you both!
Nice! Thank you José!