Files
mongo/jstests/core/basic7.js
Rishab Joshi 4329ffafa3 SERVER-50442 Remove ensureIndex shell function
This commit replaces all the usages of ensureIndex() with createIndex() in JS tests and JS shell""
2020-11-17 14:23:10 +00:00

11 lines
176 B
JavaScript

t = db.basic7;
t.drop();
t.save({a: 1});
t.createIndex({a: 1});
assert.eq(t.find().toArray()[0].a, 1);
assert.eq(t.find().arrayAccess(0).a, 1);
assert.eq(t.find()[0].a, 1);