Skip to content

Commit

Permalink
Leave an open question about whether to move test utils
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown committed Sep 19, 2024
1 parent 25193f4 commit 4aab6cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4aab6cf

Please sign in to comment.