jstests/libs/api_version_helpers.js
/**
     * Asserts that the pipeline fails with the given code when apiStrict is set to true and
     * apiVersion is "1".
     */
Asserts that the pipeline fails with the given code when apiStrict is set to true and
apiVersion is "1".
Asserts that the pipeline fails with the given code when apiStrict is set to true and apiVersion is " 1 " .
function assertAggregateFailsWithAPIStrict(pipeline, collName, errorCodes) {
        assert.commandFailedWithCode(db.runCommand({
            aggregate: collName,
            pipeline: pipeline,
            cursor: {},
            apiStrict: true,
            apiVersion: "1"
        }),
                                     errorCodes,
                                     pipeline);
    }
function assertAggregateFailsWithAPIStrict ( pipeline , collName , errorCodes ) { assert . commandFailedWithCode ( db . runCommand ( { aggregate : collName , pipeline : pipeline , cursor : { } , apiStrict : true , apiVersion : "1" } ) , errorCodes , pipeline ) ; }
Asserts that the pipeline fails with the given code when apiStrict is set to true and
 apiVersion is "1".
Asserts that the pipeline fails with the given code when apiStrict is set to true and apiVersion is " 1 " .