@@ -3,7 +3,7 @@ import { transpile } from "./transpile";
33
44describe ( "transpile" , ( ) => {
55 it ( "should inject export fixers" , ( ) => {
6- const result = transpile ( "" , "defineRoute" ) ;
6+ const result = transpile ( "" , "defineRoute" , null ) ;
77 expect ( result ) . toContain ( "exports.GET = void 0;" ) ;
88 expect ( result ) . toContain ( "exports.POST = void 0;" ) ;
99 expect ( result ) . toContain ( "exports.PUT = void 0;" ) ;
@@ -19,12 +19,12 @@ describe("transpile", () => {
1919 const filePath = "src/app/users/route.ts" ;
2020 const response = await fetch ( `https://raw.githubusercontent.com/${ repoName } /refs/heads/${ branchName } /${ filePath } ` ) ;
2121 const example = await response . text ( ) ;
22- const result = transpile ( example , "defineRoute" ) ;
22+ const result = transpile ( example , "defineRoute" , null ) ;
2323 expect ( result ) . toContain ( "require(\"@omer-x/next-openapi-route-handler\");" ) ;
2424 } ) ;
2525
2626 it ( "should not inject '@omer-x/next-openapi-route-handler' while it is not necessary" , ( ) => {
27- const result = transpile ( "" , "defineRoute" ) ;
27+ const result = transpile ( "" , "defineRoute" , null ) ;
2828 expect ( result ) . not . toContain ( "require(\"@omer-x/next-openapi-route-handler\");" ) ;
2929 } ) ;
3030
@@ -36,12 +36,12 @@ describe("transpile", () => {
3636 name: z.string().min(3).max(255).optional(),
3737 });
3838 ` ;
39- const result = transpile ( rawCodeExample , "defineRoute" ) ;
39+ const result = transpile ( rawCodeExample , "defineRoute" , null ) ;
4040 expect ( result ) . toContain ( "require(\"zod\");" ) ;
4141 } ) ;
4242
4343 it ( "should not inject 'zod' while it is not necessary" , ( ) => {
44- const result = transpile ( "" , "defineRoute" ) ;
44+ const result = transpile ( "" , "defineRoute" , null ) ;
4545 expect ( result ) . not . toContain ( "require(\"zod\");" ) ;
4646 } ) ;
4747} ) ;
0 commit comments