@@ -48,6 +48,7 @@ import { type ValidatedServerConfig } from "../../src/utils/ValidatedServerConfi
4848import { EnhancedMap } from "../../src/utils/maps" ;
4949import { type AsyncStoreWithClient } from "../../src/stores/AsyncStoreWithClient" ;
5050import MatrixClientBackedSettingsHandler from "../../src/settings/handlers/MatrixClientBackedSettingsHandler" ;
51+ import MatrixClientBackedController from "../../src/settings/controllers/MatrixClientBackedController" ;
5152
5253/**
5354 * Stub out the MatrixClient, and configure the MatrixClientPeg object to
@@ -75,6 +76,7 @@ export function stubClient(): MatrixClient {
7576 peg . get = ( ) => client ;
7677 peg . safeGet = ( ) => client ;
7778 MatrixClientBackedSettingsHandler . matrixClient = client ;
79+ MatrixClientBackedController . matrixClient = client ;
7880 return client ;
7981}
8082
@@ -249,7 +251,7 @@ export function createTestClient(): MatrixClient {
249251 decryptEventIfNeeded : ( ) => Promise . resolve ( ) ,
250252 isUserIgnored : jest . fn ( ) . mockReturnValue ( false ) ,
251253 getCapabilities : jest . fn ( ) . mockResolvedValue ( { } ) ,
252- getCachedCapabilities : jest . fn ( ) . mockResolvedValue ( { } ) ,
254+ getCachedCapabilities : jest . fn ( ) . mockReturnValue ( { } ) ,
253255 supportsThreads : jest . fn ( ) . mockReturnValue ( false ) ,
254256 supportsIntentionalMentions : jest . fn ( ) . mockReturnValue ( false ) ,
255257 getRoomUpgradeHistory : jest . fn ( ) . mockReturnValue ( [ ] ) ,
0 commit comments