Skip to content

Commit 07a22a9

Browse files
committed
Test cases for no-unused-block-params
1 parent d7465c1 commit 07a22a9

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/lib/rules/template-no-unused-block-params.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ const validHbs = [
1111
'{{#each cats as |cat|}}{{meow cat}}{{/each}}',
1212
'{{#each cats as |cat index|}}{{index}}{{/each}}',
1313
'{{#each cats as |cat index|}}{{#each cat.lives as |life|}}{{index}}: {{life}}{{/each}}{{/each}}',
14+
`
15+
{{#each cats as |cat|}}
16+
<div data-cat-name={{cat.name}}></div>
17+
{{/each}}
18+
`,
19+
`
20+
{{#each cats as |cat|}}
21+
<div class="cat {{cat.name}}"></div>
22+
{{/each}}
23+
`,
24+
`
25+
{{#each cats as |cat|}}
26+
<div class="cat {{if (isFavorite cat.name favoriteCatNames) 'favorite'}}"></div>
27+
{{/each}}
28+
`,
1429
`
1530
<MyComponent @model={{this.model}} as |param|>
1631
{{! template-lint-disable }}

0 commit comments

Comments
 (0)