Modules§
- event_
factory - mocks
- Mocks useful to reuse across different testing contexts.
- notification_
settings - test_
json - Test data for the matrix-sdk crates.
Macros§
- init_
tracing_ for_ tests - Initialize a tracing subscriber if the target architecture is not WASM.
- message_
like_ event_ content - Create a
Raw<AnyMessageLikeEventContent>
from arbitrary JSON. - stripped_
state_ event - Create a
Raw<AnyStrippedStateEvent>
from arbitrary JSON. - sync_
state_ event - Create a
Raw<AnySyncStateEvent>
from arbitrary JSON. - sync_
timeline_ event - Create a
Raw<AnySyncTimelineEvent>
from arbitrary JSON. - timeline_
event - Create a
Raw<AnyTimelineEvent>
from arbitrary JSON.
Structs§
- Invited
Room Builder - Joined
Room Builder - Knocked
Room Builder - Left
Room Builder - Sync
Response Builder - The
SyncResponseBuilder
struct can be used to easily generate valid sync responses for testing. These can be then fed into eitherClient
orRoom
.
Enums§
- Ephemeral
Test Event - Test events that can be added to the ephemeral events.
- Global
Account Data Test Event - Test events that can be added to the global account data.
- Presence
Test Event - Test events that can be added to the presence events.
- Room
Account Data Test Event - Test events that can be added to the room account data.
- State
Test Event - Test events that can be added to the state.
- Stripped
State Test Event - Test events that can be added to the stripped state.
- Sync
Response File - Embedded sync response files
Statics§
- ALICE
- BOB
- CAROL
- DEFAULT_
TEST_ ROOM_ ID - The default room ID for tests.
Functions§
- bulk_
room_ members - Create
m.room.member
events in the given range. - ruma_
response_ from_ json - Build a typed Ruma [
IncomingResponse
] object from a json body. - ruma_
response_ to_ json - Serialise a typed Ruma [
OutgoingResponse
] object to JSON. - sync_
response - Get specific API responses for testing
Attribute Macros§
- async_
test - Attribute to use
wasm_bindgen_test
for wasm32 targets andtokio::test
for everything else with async-support and custom result-types