spec/integ/matrix-client-crypto.spec.js
/**
 * Set an expectation that bob will upload device keys and a number of one-time keys;
 * then flush the http requests.
 *
 * <p>Updates <tt>bobDeviceKeys</tt>, <tt>bobOneTimeKeys</tt>,
 * <tt>bobDeviceCurve25519Key</tt>, <tt>bobDeviceEd25519Key</tt>
 *
 * @return {promise} completes once the http requests have completed.
 */
Set an expectation that bob will upload device keys and a number of one-time keys;
then flush the http requests.



@return {promise} completes once the http requests have completed.
Set an expectation that bob will upload device keys and a number of one - time keys ; then flush the http requests . @return { promise } completes once the http requests have completed .
function expectBobKeyUpload() {
    return expectKeyUpload(bobDeviceId, bobHttpBackend).then(function(content) {
        bobDeviceKeys = content.device_keys;
        bobOneTimeKeys = content.one_time_keys;
        expect(bobDeviceKeys).toBeDefined();
        expect(bobOneTimeKeys).toBeDefined();
        bobDeviceCurve25519Key = bobDeviceKeys.keys["curve25519:bvcxz"];
        bobDeviceEd25519Key = bobDeviceKeys.keys["ed25519:bvcxz"];
    });
}
function expectBobKeyUpload ( ) { return expectKeyUpload ( bobDeviceId , bobHttpBackend ) . then ( function ( content ) { bobDeviceKeys = content . device_keys ; bobOneTimeKeys = content . one_time_keys ; expect ( bobDeviceKeys ) . toBeDefined ( ) ; expect ( bobOneTimeKeys ) . toBeDefined ( ) ; bobDeviceCurve25519Key = bobDeviceKeys . keys [ "curve25519:bvcxz" ] ; bobDeviceEd25519Key = bobDeviceKeys . keys [ "ed25519:bvcxz" ] ; } ) ; }
Set an expectation that bob will upload device keys and a number of one-time keys;
 then flush the http requests.
Set an expectation that bob will upload device keys and a number of one - time keys ; then flush the http requests .