Skip to content

Commit

Permalink
test: fix legacy middleware test
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 13, 2022
1 parent a9b3187 commit 408f3f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,11 @@ describe("app", () => {
it("wait for middleware (req, res, next)", async () => {
app.use(
"/",
fromNodeMiddleware((_req, res) => {
fromNodeMiddleware((_req, res, next) => {
setTimeout(() => {
res.setHeader("content-type", "application/json");
res.end(JSON.stringify({ works: 1 }));
next();
}, 10);
})
);
Expand Down

0 comments on commit 408f3f2

Please sign in to comment.