Available on crate features
testing only.Expand description
Testing utilities - DO NOT USE IN PRODUCTION.
Modules§
- client
- Augmented
ClientBuilderthat can set up an already logged-in user. - mocks
Non- target_family=wasm - Helpers to mock a server and have a client automatically connected to that server, for the purpose of integration tests.
Functions§
- assert_
event_ matches_ msg - Checks that an event is a message-like text event with the given text.
- logged_
in_ client - A
Clientusing the givenhomeserver_url(or localhost:1234), that will never retry any failed requests, and already logged in with an hardcoded Matrix authentication session (the user id and device id are hardcoded too). - logged_
in_ client_ with_ server Non- target_family=wasm - Like
logged_in_client, but with a mocked server too. - no_
retry_ test_ client - A
Clientusing the givenhomeserver_url(or localhost:1234), that will never retry any failed requests. - no_
retry_ test_ client_ with_ server Non- target_family=wasm - Like
no_retry_test_client, but with a mocked server too. - set_
client_ session - Restore the common (Matrix-auth) user session for a client.
- test_
client_ builder - A
ClientBuilderfit for testing, using the givenhomeserver_url(or localhost:1234). - test_
client_ builder_ with_ server Non- target_family=wasm - Like
test_client_builder, but with a mocked server too.