janl commented on code in PR #9176:
URL: https://github.com/apache/pouchdb/pull/9176#discussion_r2832225162


##########
tests/unit/test.mapreduce.js:
##########
@@ -6,63 +6,81 @@ var upsert = PouchDB.utils.upsert;
 var utils = PouchDB.utils.mapReduceUtils;
 
 describe('test.mapreduce.js-upsert', function () {
-  it('should throw an error if the doc errors', function () {
-    return upsert({
-      get: function () {
-        return Promise.reject(new Error('a fake error!'));
-      }
-    }, 'foo')
-    .then(function () {
+  it('should throw an error if the doc errors', async function () {
+    try {
+      await upsert(
+        {

Review Comment:
   just a style nit, but I’d be okay with having the opening curlies start with 
the method: `upsert({` to save a mostly empty line



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to