Skip to content

Commit

Permalink
test(types): add test case for using post(save) with no next() arg
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Apr 9, 2024
1 parent 7629c94 commit f76c7e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/types/middleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ schema.post<ITest>('save', function() {
console.log(this.name);
});

schema.post<ITest>('save', async function() {
console.log(this.name);
});

schema.post<ITest>('save', function(err: Error, res: ITest, next: Function) {
console.log(this.name, err.stack);
});
Expand Down

0 comments on commit f76c7e3

Please sign in to comment.