Available on crate feature
testing
only.Expand description
Testing utilities - DO NOT USE IN PRODUCTION.
Modules§
- client
- Augmented
ClientBuilder
that can set up an already logged-in user. - mocks
Non-WebAssembly - 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
Client
using 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-WebAssembly - Like
logged_in_client
, but with a mocked server too. - no_
retry_ test_ client - A
Client
using the givenhomeserver_url
(or localhost:1234), that will never retry any failed requests. - no_
retry_ test_ client_ with_ server Non-WebAssembly - 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
ClientBuilder
fit for testing, using the givenhomeserver_url
(or localhost:1234). - test_
client_ builder_ with_ server Non-WebAssembly - Like
test_client_builder
, but with a mocked server too.