Test for asserted identity

This is out first CallHandler test(!) Switches react-sdk to use
createCall on the client object so we can stub this out in the test.
Add a bunch more stubs to the test client.

There's more stuff in this test that has scope to be used more
widely, like waiting for a certain dispatch and mocking out rooms
with particular sets of users in them: we could consider moving these
out to test utils if we wanted.
This commit is contained in:
David Baker 2021-04-23 14:39:39 +01:00
parent ee96201e33
commit dc3d05bc88
4 changed files with 231 additions and 4 deletions

View file

@ -55,6 +55,15 @@ export default class DMRoomMap {
return DMRoomMap.sharedInstance;
}
/**
* Set the shared instance to the instance supplied
* Used by tests
* @param inst the new shared instance
*/
public static setShared(inst: DMRoomMap) {
DMRoomMap.sharedInstance = inst;
}
/**
* Returns a shared instance of the class
* that uses the singleton matrix client