jstests/libs/api_version_helpers.js
/**
     * Asserts that the pipeline succeeds when apiStrict is set to true and
     * apiVersion is "1".
     */
Asserts that the pipeline succeeds when apiStrict is set to true and
apiVersion is "1".
Asserts that the pipeline succeeds when apiStrict is set to true and apiVersion is " 1 " .
function assertAggregateSucceedsWithAPIStrict(pipeline, collName, errorCodes) {
        if (errorCodes) {
            assert.commandWorkedOrFailedWithCode(db.runCommand({
                aggregate: collName,
                pipeline: pipeline,
                cursor: {},
                apiStrict: true,
                apiVersion: "1"
            }),
                                                 errorCodes,
                                                 pipeline);
        } else {
            assert.commandWorked(db.runCommand({
                aggregate: collName,
                pipeline: pipeline,
                cursor: {},
                apiStrict: true,
                apiVersion: "1"
            }),
                                 pipeline);
        }
    }
function assertAggregateSucceedsWithAPIStrict ( pipeline , collName , errorCodes ) { if ( errorCodes ) { assert . commandWorkedOrFailedWithCode ( db . runCommand ( { aggregate : collName , pipeline : pipeline , cursor : { } , apiStrict : true , apiVersion : "1" } ) , errorCodes , pipeline ) ; } else { assert . commandWorked ( db . runCommand ( { aggregate : collName , pipeline : pipeline , cursor : { } , apiStrict : true , apiVersion : "1" } ) , pipeline ) ; } }
Asserts that the pipeline succeeds when apiStrict is set to true and
 apiVersion is "1".
Asserts that the pipeline succeeds when apiStrict is set to true and apiVersion is " 1 " .