Crate matrix_sdk_test

Source

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§

InvitedRoomBuilder
JoinedRoomBuilder
KnockedRoomBuilder
LeftRoomBuilder
SyncResponseBuilder
The SyncResponseBuilder struct can be used to easily generate valid sync responses for testing. These can be then fed into either Client or Room.

Enums§

EphemeralTestEvent
Test events that can be added to the ephemeral events.
GlobalAccountDataTestEvent
Test events that can be added to the global account data.
PresenceTestEvent
Test events that can be added to the presence events.
RoomAccountDataTestEvent
Test events that can be added to the room account data.
StateTestEvent
Test events that can be added to the state.
StrippedStateTestEvent
Test events that can be added to the stripped state.
SyncResponseFile
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 and tokio::test for everything else with async-support and custom result-types