jstests/noPassthrough/change_stream_transaction.js
/**
 * Asserts that the expected operation type and documentKey are found on the change stream
 * cursor. Returns the change stream document.
 */
Asserts that the expected operation type and documentKey are found on the change stream
cursor. Returns the change stream document.
Asserts that the expected operation type and documentKey are found on the change stream cursor . Returns the change stream document .
function assertWriteVisible(cursor, operationType, documentKey) {
    assert.soon(() => cursor.hasNext());
    const changeDoc = cursor.next();
    assert.eq(operationType, changeDoc.operationType, changeDoc);
    assert.eq(documentKey, changeDoc.documentKey, changeDoc);
    return changeDoc;
}
function assertWriteVisible ( cursor , operationType , documentKey ) { assert . soon ( ( ) => cursor . hasNext ( ) ) ; const changeDoc = cursor . next ( ) ; assert . eq ( operationType , changeDoc . operationType , changeDoc ) ; assert . eq ( documentKey , changeDoc . documentKey , changeDoc ) ; return changeDoc ; }
Asserts that the expected operation type and documentKey are found on the change stream
 cursor.
Asserts that the expected operation type and documentKey are found on the change stream cursor .