jstests/core/views/dbref_projection.js
// Check that the view and base collection return the same thing.
Check that the view and base collection return the same thing.
Check that the view and base collection return the same thing .
function checkViewAndBaseCollection(projection, expectedResult) {
    const baseRes = viewsDB.baseColl.find({}, projection).toArray();
    const viewRes = viewsDB.view.find({}, projection).toArray();
    assert.eq(baseRes, viewRes);
    assert.eq(expectedResult, baseRes);
}
function checkViewAndBaseCollection ( projection , expectedResult ) { const baseRes = viewsDB . baseColl . find ( { } , projection ) . toArray ( ) ; const viewRes = viewsDB . view . find ( { } , projection ) . toArray ( ) ; assert . eq ( baseRes , viewRes ) ; assert . eq ( expectedResult , baseRes ) ; }
Check that the view and base collection return the same thing.
Check that the view and base collection return the same thing .