You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
Pass around MatrixClients instead of using MatrixClientPeg (#10984)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b6b9ce3c46
commit
21ffc50f1e
@ -59,8 +59,8 @@ const mockDispatcher = mocked(dis);
|
||||
const flushPromises = async () => await new Promise(process.nextTick);
|
||||
|
||||
describe("DeviceListener", () => {
|
||||
let mockClient: Mocked<MatrixClient> | undefined;
|
||||
let mockCrypto: Mocked<CryptoApi> | undefined;
|
||||
let mockClient: Mocked<MatrixClient>;
|
||||
let mockCrypto: Mocked<CryptoApi>;
|
||||
|
||||
// spy on various toasts' hide and show functions
|
||||
// easier than mocking
|
||||
@ -111,7 +111,7 @@ describe("DeviceListener", () => {
|
||||
|
||||
const createAndStart = async (): Promise<DeviceListener> => {
|
||||
const instance = new DeviceListener();
|
||||
instance.start();
|
||||
instance.start(mockClient);
|
||||
await flushPromises();
|
||||
return instance;
|
||||
};
|
||||
|
Reference in New Issue
Block a user