nicer output, comment

This commit is contained in:
Bruno Windels 2019-04-03 14:37:03 +02:00
parent e147cc9341
commit e10e4b0eab

View file

@ -39,9 +39,10 @@ module.exports = async function e2eEncryptionScenarios(alice, bob) {
bob.log.step(`starts SAS verification with ${alice.username}`);
const bobSasPromise = startSasVerifcation(bob, alice.username);
const aliceSasPromise = acceptSasVerification(alice, bob.username);
// wait in parallel, so they don't deadlock on each other
const [bobSas, aliceSas] = await Promise.all([bobSasPromise, aliceSasPromise]);
assert.deepEqual(bobSas, aliceSas);
bob.log.done(`done, (${bobSas.join(", ")}) matches!`);
bob.log.done(`done (match for ${bobSas.join(", ")})`);
const aliceMessage = "Guess what I just heard?!"
await sendMessage(alice, aliceMessage);
await receiveMessage(bob, {sender: "alice", body: aliceMessage, encrypted: true});