mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
fix tests
This commit is contained in:
parent
c2b6c44a68
commit
ab65745b07
@ -128,7 +128,6 @@ import {SendDoneStage} from "./stages/SendDoneStage";
|
||||
import {SendAcceptVerificationStage} from "./stages/SendAcceptVerificationStage";
|
||||
|
||||
export function tests() {
|
||||
|
||||
async function createSASRequest(
|
||||
ourUserId: string,
|
||||
ourDeviceId: string,
|
||||
@ -190,6 +189,7 @@ export function tests() {
|
||||
olm,
|
||||
startingMessage,
|
||||
);
|
||||
const crossSigning = new MockCrossSigning() as unknown as CrossSigning;
|
||||
const clock = new MockClock();
|
||||
const logger = new NullLogger();
|
||||
return logger.run("log", (log) => {
|
||||
@ -207,6 +207,7 @@ export function tests() {
|
||||
ourUserId,
|
||||
ourUserDeviceId: ourDeviceId,
|
||||
log,
|
||||
crossSigning
|
||||
});
|
||||
// @ts-ignore
|
||||
channel.setOlmSas(sas.olmSas);
|
||||
@ -217,6 +218,16 @@ export function tests() {
|
||||
});
|
||||
}
|
||||
|
||||
class MockCrossSigning {
|
||||
signDevice(deviceId: string, log: ILogItem) {
|
||||
return Promise.resolve({}); // device keys, means signing succeeded
|
||||
}
|
||||
|
||||
signUser(userId: string, log: ILogItem) {
|
||||
return Promise.resolve({}); // cross-signing keys, means signing succeeded
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
"Order of stages created matches expected order when I sent request, they sent start": async (assert) => {
|
||||
const ourDeviceId = "ILQHOACESQ";
|
||||
|
Loading…
Reference in New Issue
Block a user