{"size": 894, "ext": "js", "max_stars_repo_path": "jstests/core/create_index_helper_validation.js", "max_stars_repo_name": "benety/mongo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "jstests/core/create_index_helper_validation.js", "max_issues_repo_name": "benety/mongo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "jstests/core/create_index_helper_validation.js", "max_forks_repo_name": "benety/mongo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.8275862069, "max_line_length": 89, "alphanum_fraction": 0.4395973154}
// Tests that helper functions for creating indexes check the number of arguments passed.

(function() {
"use strict";

const coll = db.create_index_helper_validation;
coll.drop();

assert.throws(() => coll.createIndexes(
                  /* keys */[{a: 1}],
                  /* options */ {},
                  /* commitQuorum */ "majority",
                  {background: true},
                  {unique: true}));

assert.throws(() => coll.createIndex(
                  /* keys */ {a: 1},
                  /* options */ {},
                  /* commitQuorum */ "majority",
                  {background: true},
                  {unique: true}));

assert.throws(() => coll.createIndex(
                  /* keys */ {a: 1},
                  /* options */ {},
                  /* commitQuorum */ "majority",
                  {background: true},
                  {unique: true}));
}());