Device manager - verify other devices (PSG-724) (#9274)
* trigger verification of other devices * tests * fix strict errors * add types
This commit is contained in:
parent
236ca2e494
commit
4623d84dd0
6 changed files with 181 additions and 15 deletions
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
import EventEmitter from "events";
|
||||
import { MethodKeysOf, mocked, MockedObject } from "jest-mock";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixClient, User } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { MatrixClientPeg } from "../../src/MatrixClientPeg";
|
||||
|
||||
|
@ -65,6 +65,7 @@ export const unmockClientPeg = () => jest.spyOn(MatrixClientPeg, 'get').mockRest
|
|||
*/
|
||||
export const mockClientMethodsUser = (userId = '@alice:domain') => ({
|
||||
getUserId: jest.fn().mockReturnValue(userId),
|
||||
getUser: jest.fn().mockReturnValue(new User(userId)),
|
||||
isGuest: jest.fn().mockReturnValue(false),
|
||||
mxcUrlToHttp: jest.fn().mockReturnValue('mock-mxcUrlToHttp'),
|
||||
credentials: { userId },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue