spec/integ/matrix-client-crypto.spec.js
/**
 * Set an expectation that Ali will send a message, and flush the request
 *
 * @return {promise} which resolves to the ciphertext for Bob's device.
 */
Set an expectation that Ali will send a message, and flush the request
@return {promise} which resolves to the ciphertext for Bob's device.
Set an expectation that Ali will send a message and flush the request @return { promise } which resolves to the ciphertext for Bob ' s device .
function expectAliSendMessageRequest() {
    return expectSendMessageRequest(aliHttpBackend).then(function(content) {
        aliMessages.push(content);
        expect(utils.keys(content.ciphertext)).toEqual([bobDeviceCurve25519Key]);
        const ciphertext = content.ciphertext[bobDeviceCurve25519Key];
        expect(ciphertext).toBeDefined();
        return ciphertext;
    });
}
function expectAliSendMessageRequest ( ) { return expectSendMessageRequest ( aliHttpBackend ) . then ( function ( content ) { aliMessages . push ( content ) ; expect ( utils . keys ( content . ciphertext ) ) . toEqual ( [ bobDeviceCurve25519Key ] ) ; const ciphertext = content . ciphertext [ bobDeviceCurve25519Key ] ; expect ( ciphertext ) . toBeDefined ( ) ; return ciphertext ; } ) ; }
Set an expectation that Ali will send a message, and flush the request
 @return {promise} which resolves to the ciphertext for Bob's device.
Set an expectation that Ali will send a message and flush the request @return { promise } which resolves to the ciphertext for Bob ' s device .