Skip to content

Commit

Permalink
Add failing unit test for #1686
Browse files Browse the repository at this point in the history
  • Loading branch information
graphicore committed May 5, 2020
1 parent 3789a30 commit 801b878
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/regressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,3 +528,21 @@ describe('Regressions', function() {
});
});
});

describe('GH-1686: Nested each with equal values skips some iterations.', function() {
it('each with nested equal primitive type values', function() {
expectTemplate(
'{{#each abc as | c1 |}}' +
'{{#each ../abc as | c2 |}}' +
'{{#each ../../abc as | c3 |}}' +
'{{c1}}{{c2}}{{c3}} {{else}}! ' +
'{{/each}}\n' +
'{{/each}}\n\n' +
'{{/each}}'
)
.withInput({ abc: ['A', 'B', 'C'] })
.toCompileTo(
'AAA AAB AAC \nABA ABB ABC \nACA ACB ACC \n\nBAA BAB BAC \nBBA BBB BBC \nBCA BCB BCC \n\nCAA CAB CAC \nCBA CBB CBC \nCCA CCB CCC \n\n'
);
});
});

0 comments on commit 801b878

Please sign in to comment.