Closed rodnaph closed 2 years ago
I believe #24 would also solve this issue but let's go with this PR for now.
Resetting before makes sense for the reason you describe. We should keep the
@after
though.BTW, I merged #39, so if you rebase - the tests should pass.
Updated and rebased, thanks.
Thanks @rodnaph!
Updates the
InteractsWithMessenger
trait to clear theTestTransport
before each test, as well as after.Previously, the transport was only reset after each test in a TestCase using this trait. If other tests run first though which send messages, but do not make messenger assertions (as the transport is overridden for the entire
test
environment), then the transport isn't cleared at all, so the first test to run in a test case with this trait will have the state from the previous tests.I don't know if there's currently a reason for having it specifically after, is this a BC break? Is there a better solution? Is there a test I can add or update to verify this behaviour?