From f76c7e308c4ffe385af8211c122670c2c4a45efe Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Tue, 9 Apr 2024 11:55:50 -0400 Subject: [PATCH] test(types): add test case for using `post(save)` with no `next()` arg --- test/types/middleware.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/types/middleware.test.ts b/test/types/middleware.test.ts index e127c3b683b..2cb24ba929f 100644 --- a/test/types/middleware.test.ts +++ b/test/types/middleware.test.ts @@ -63,6 +63,10 @@ schema.post('save', function() { console.log(this.name); }); +schema.post('save', async function() { + console.log(this.name); +}); + schema.post('save', function(err: Error, res: ITest, next: Function) { console.log(this.name, err.stack); });