matrix-org / matrix-org/matrix-js-sdk

DI RoomMembers for RoomState for testing

Open
#245 0 comments 0 reactions 0 assignees View on GitHub
T-Enhancement
Dominant language
TypeScript
Stars
2.2k
Forks
704
Avg merge
1d 20h
Merged PRs (30d)
40

Description

Add a 2nd param to RoomState which is a function to invoke to create a new RoomMember to avoid doing implicit assertions like we currently do on RoomState UTs. If no 2nd param is supplied, use default impl.

https://matrix.org/jira/browse/SYJS-13

Contributor guide

Open the contributing guide

Research direction

Start by locating RoomState, its RoomMember creation path, and the existing RoomState unit tests referenced in the issue. Check how the current tests rely on implicit assertions, then verify that an optional creation function is used when supplied and the default implementation remains unchanged when it is omitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.