Confusing use of await

Reading through the codebase, I spotted a few places where the await operator is used before expression that does not return a promise. For example:

In basic-updates.spec.js line 124:
await theaters.find({ "location.address.zipcode": "55111"})

According to the node driver docs, collection.find() return a cursor instead of promise.

The same goes to moviesDAO.js line 64 and line 243.

I read about previous threads mentioning similar issues but I am still confused about the rationale behind adding the await operator.

Hi @Jason_11967,

I am not a subject expert, but I believe this is more like a synchronous call, below link describes it in more detail.

Please let me know if this helps.

Kanika