Leave an open question about whether to move test utils

This commit is contained in:
Robin 2024-09-18 23:10:30 -04:00
parent 25193f467a
commit 4aab6cfe4e

View File

@ -87,6 +87,9 @@ function mockEmitter<T>(): EmitterMock<T> {
};
}
// Maybe it'd be good to move this to matrix-js-sdk? Our testing needs are
// rather simple, but if one util to mock a member is good enough for us, maybe
// it's useful for matrix-js-sdk consumers in general.
export function mockMember(member: Partial<RoomMember>): RoomMember {
return { ...mockEmitter(), ...member } as RoomMember;
}