diff --git a/test/looping-test.js b/test/looping-test.js index 96deaf6..889f8ce 100644 --- a/test/looping-test.js +++ b/test/looping-test.js @@ -231,4 +231,22 @@ test("Test case from #175 nested webc:for", async t => { `); -}); \ No newline at end of file +}); + + +test("webc:for with multiple sub-elements", async (t) => { + let component = new WebC(); + + component.setInputPath("./test/stubs/looping/array-multiple-sub.webc"); + + let { html } = await component.compile(); + + t.is( + html.trim(), + `
+
1
+
2
+
`, + ); +}); + diff --git a/test/stubs/looping/array-multiple-sub.webc b/test/stubs/looping/array-multiple-sub.webc new file mode 100644 index 0000000..c677f1e --- /dev/null +++ b/test/stubs/looping/array-multiple-sub.webc @@ -0,0 +1,4 @@ +
+
+
+