-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Test code:
it('renders a nested loop correctly', () => {
const template = "<div>TestDiv</div>{{% for item of list <ul>{{% for object of item <li>{{object.label}}</li> %}}</ul> %}}";
const templateObject = {
list: [[{ label: "Item1" }, { label: "Item2" }, { label: "Item3" }]],
};
expect(cleanHtml(render(template, templateObject))).toBe("<div>TestDiv</div><ul><li>Item1</li><li>Item2</li><li>Item3</li></ul>");
});
Notice the <ul> inside the first loop, it should also be repeated 3x.
"<div>TestDiv</div><ul><li>Item1</li></ul><ul><li>Item2</li></ul><ul><li>Item3</li></ul>"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working