diff --git a/jte/src/main/java/gg/jte/compiler/TemplateCompiler.java b/jte/src/main/java/gg/jte/compiler/TemplateCompiler.java index a8665ba9..a8f4e1cd 100644 --- a/jte/src/main/java/gg/jte/compiler/TemplateCompiler.java +++ b/jte/src/main/java/gg/jte/compiler/TemplateCompiler.java @@ -284,6 +284,8 @@ public ClassInfo generateTemplateCall(String name, LinkedHashSetline chart (checkout)

line chart (core)"""); } + @Test + void emptyTopLevelModule_generateAll() { + DirectoryCodeResolver codeResolver = new DirectoryCodeResolver(Path.of("src/test/modules/empty-top-level-module")); + TemplateEngine templateEngine = TemplateEngine.create(codeResolver, ContentType.Html); + + List templates = templateEngine.generateAll(); + + assertThat(templates).containsExactlyInAnyOrder( + "gg/jte/generated/ondemand/apexcharts/JtelinechartGenerated.java", + "gg/jte/generated/ondemand/checkout/JtepageGenerated.java", + "gg/jte/generated/ondemand/core/JtelayoutGenerated.java", + "gg/jte/generated/ondemand/core/component/JtecssGenerated.java" + ); + } + // TODO adjust precompileAll() and generateAll() to iterate over all module files as well! }