jstests/libs/api_version_helpers.js
/**
     * Asserts that the given pipeline cannot be used to define a view when apiStrict is set to true
     * and apiVersion is "1" on the create command.
     */
Asserts that the given pipeline cannot be used to define a view when apiStrict is set to true
and apiVersion is "1" on the create command.
Asserts that the given pipeline cannot be used to define a view when apiStrict is set to true and apiVersion is " 1 " on the create command .
function assertViewFailsWithAPIStrict(pipeline, viewName, collName) {
        assert.commandFailedWithCode(db.runCommand({
            create: viewName,
            viewOn: collName,
            pipeline: pipeline,
            apiStrict: true,
            apiVersion: "1"
        }),
                                     ErrorCodes.APIStrictError,
                                     pipeline);
    }
function assertViewFailsWithAPIStrict ( pipeline , viewName , collName ) { assert . commandFailedWithCode ( db . runCommand ( { create : viewName , viewOn : collName , pipeline : pipeline , apiStrict : true , apiVersion : "1" } ) , ErrorCodes . APIStrictError , pipeline ) ; }
Asserts that the given pipeline cannot be used to define a view when apiStrict is set to true
 and apiVersion is "1" on the create command.
Asserts that the given pipeline cannot be used to define a view when apiStrict is set to true and apiVersion is " 1 " on the create command .