title: Using await is not waiting for a Promise to resolve, can you please tell me why I'm facing this behavior?
body: <p>I have got a function like this,</p>
  <pre><code> const getCurrentDetails= async () =&gt; {
      const currentDateTime = new Date(moment('00:00','HH:mm')
                                      .tz('America/New_York')
                                      .toISOString());
      const currentDateDetail = await getDetailsForTimestamp(currentDateTime);
      console.log(&quot;currentDateDetail: &quot;,currentDateDetail)  //prints PromiseProvider {}
    if(currentDateDetail){
    //do some stuff if details present
     }
  }
  </code></pre>
  <p>Even though I'm using <strong>await</strong> to <strong>resolve the promise before going to the next step</strong>, but still it <strong>logs PromiseProvider {} in the next step</strong> and the following condition check fails to validate properly.</p>
  <p>Note that the same function works fine sometimes, but not consistent as I face the above-mentioned behavior many times, I'm using <strong>node 16</strong>, and here's the getDetailsForTimestamp function.</p>
  <pre><code>const getDetailsForTimestamp = async (currentTimeStamp) =&gt; {
        const { db } = await database.getDb(process.env.DB_NAME);
        if (db) {
          return new Promise((resolve, reject) =&gt; {
            db.collection(process.env.COLLECTION_NAME)
              .findOne({ updatedAt: { $gte: currentTimeStamp } })
              .then((res) =&gt; {
                resolve(res);
              })
              .catch((err) =&gt; {
                reject(err);
              });
          });
        }
      };
  </code></pre>