jstests/libs/change_stream_util.js
/**
 * Helper to check whether a change stream event matches the given expected event. Ignores the
 * resume token and clusterTime unless they are explicitly listed in the expectedEvent.
 */
Helper to check whether a change stream event matches the given expected event. Ignores the
resume token and clusterTime unless they are explicitly listed in the expectedEvent.
Helper to check whether a change stream event matches the given expected event . Ignores the resume token and clusterTime unless they are explicitly listed in the expectedEvent .
function assertChangeStreamEventEq(actualEvent, expectedEvent) {
    const testEvent = canonicalizeEventForTesting(Object.assign({}, actualEvent), expectedEvent);
    assert.docEq(testEvent,
                 expectedEvent,
                 "Change did not match expected change. Expected change: " + tojson(expectedEvent) +
                     ", Actual change: " + tojson(testEvent));
}
function assertChangeStreamEventEq ( actualEvent , expectedEvent ) { const testEvent = canonicalizeEventForTesting ( Object . assign ( { } , actualEvent ) , expectedEvent ) ; assert . docEq ( testEvent , expectedEvent , "Change did not match expected change. Expected change: " + tojson ( expectedEvent ) + ", Actual change: " + tojson ( testEvent ) ) ; }
Helper to check whether a change stream event matches the given expected event.
Helper to check whether a change stream event matches the given expected event .