1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Make the tests pass

This commit is contained in:
Travis Ralston
2020-01-23 20:41:52 -07:00
parent 3c1dca6cef
commit b8092cd00b
5 changed files with 36 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ import {InRoomChannel} from "../../../../src/crypto/verification/request/InRoomC
import {ToDeviceChannel} from
"../../../../src/crypto/verification/request/ToDeviceChannel";
import {MatrixEvent} from "../../../../src/models/event";
import {setupWebcrypto, teardownWebcrypto} from "./util";
function makeMockClient(userId, deviceId) {
let counter = 1;
@@ -115,6 +116,15 @@ async function distributeEvent(ownRequest, theirRequest, event) {
}
describe("verification request unit tests", function() {
beforeAll(function() {
setupWebcrypto();
});
afterAll(() => {
teardownWebcrypto();
});
it("transition from UNSENT to DONE through happy path", async function() {
const alice = makeMockClient("@alice:matrix.tld", "device1");
const bob = makeMockClient("@bob:matrix.tld", "device1");