mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
- fix test: 'mongo-livedata - empty documents, MONGO | STRING'
This commit is contained in:
@@ -1587,22 +1587,21 @@ _.each( ['STRING', 'MONGO'], function(idGeneration) {
|
||||
|
||||
|
||||
testAsyncMulti('mongo-livedata - empty documents, ' + idGeneration, [
|
||||
function (test, expect) {
|
||||
function(test, expect) {
|
||||
this.collectionName = Random.id();
|
||||
if (Meteor.isClient) {
|
||||
Meteor.call('createInsecureCollection', this.collectionName);
|
||||
Meteor.subscribe('c-' + this.collectionName, expect());
|
||||
}
|
||||
}, function (test, expect) {
|
||||
var coll = new Mongo.Collection(this.collectionName, collectionOptions);
|
||||
},
|
||||
async function(test, expect) {
|
||||
const coll = new Mongo.Collection(this.collectionName, collectionOptions);
|
||||
|
||||
coll.insert({}, expect(function (err, id) {
|
||||
test.isFalse(err);
|
||||
test.isTrue(id);
|
||||
var cursor = coll.find();
|
||||
test.equal(cursor.count(), 1);
|
||||
}));
|
||||
}
|
||||
const id = await coll.insertAsync({});
|
||||
test.isTrue(id);
|
||||
const cursor = coll.find();
|
||||
test.equal(await cursor.countAsync(), 1);
|
||||
},
|
||||
]);
|
||||
|
||||
// Regression test for #2413.
|
||||
|
||||
Reference in New Issue
Block a user