mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
tests: fetch in observe added await to test
This commit is contained in:
@@ -3781,10 +3781,10 @@ Tinytest.add('minimongo - fetch in observe', test => {
|
||||
const coll = new LocalCollection;
|
||||
let callbackInvoked = false;
|
||||
const observe = coll.find().observeChanges({
|
||||
added(id, fields) {
|
||||
async added(id, fields) {
|
||||
callbackInvoked = true;
|
||||
test.equal(fields, {foo: 1});
|
||||
const doc = coll.findOne({foo: 1});
|
||||
test.equal(fields, { foo: 1 });
|
||||
const doc = await coll.findOne({ foo: 1 });
|
||||
test.isTrue(doc);
|
||||
test.equal(doc.foo, 1);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user