Skip to content

Commit e8fafe7

Browse files
committed
test: transpile with middleware
1 parent d29ba92 commit e8fafe7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/transpile.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,9 @@ describe("transpile", () => {
4444
const result = transpile("", "defineRoute", null);
4545
expect(result).not.toContain("require(\"zod\");");
4646
});
47+
48+
it("should inject a placeholder function for the middleware", () => {
49+
const result = transpile("", "defineRoute", "myAwesomeMiddleware");
50+
expect(result).toContain("var myAwesomeMiddleware = function (handler) { return handler; };");
51+
});
4752
});

0 commit comments

Comments
 (0)