From bb0378c49d2cae43986c70c869ccf7b56ff0b575 Mon Sep 17 00:00:00 2001 From: Akalanka Perera Date: Sat, 22 Jun 2024 22:46:16 +0530 Subject: [PATCH] Fix: test termination --- plugins/mongoose-aggregate-paginate-v2/test/index.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mongoose-aggregate-paginate-v2/test/index.test.js b/plugins/mongoose-aggregate-paginate-v2/test/index.test.js index c157169..90f1873 100644 --- a/plugins/mongoose-aggregate-paginate-v2/test/index.test.js +++ b/plugins/mongoose-aggregate-paginate-v2/test/index.test.js @@ -67,7 +67,7 @@ describe("mongoose-paginate", function () { expect(promise.then).toBeInstanceOf(Function); }); - it("callback test", function (done) { + it("callback test", async (done) =>{ var aggregate = Book.aggregate([ { $match: { @@ -78,7 +78,7 @@ describe("mongoose-paginate", function () { } ]); - aggregate.paginateExec({}, function (err, result) { + await aggregate.paginateExec({}, function (err, result) { expect(err).toBeNull(); expect(result).toBeInstanceOf(Object); done();