Skip to content

Commit ef433ce

Browse files
committed
Moree
1 parent e04a1aa commit ef433ce

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

tests/lib/rules/template-no-nested-splattributes.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,26 @@ hbsRuleTester.run('template-no-nested-splattributes', rule, {
103103
'<div ...attributes>...</div>',
104104
'<div ...attributes>...</div><div ...attributes>...</div>',
105105
],
106-
invalid: [],
106+
invalid: [
107+
{
108+
code: '<div ...attributes>\n <div ...attributes>\n ...\n </div>\n</div>\n',
109+
output: null,
110+
errors: [
111+
{
112+
message:
113+
'Do not use ...attributes on nested elements. Only use it on the top-level element of a component.',
114+
},
115+
],
116+
},
117+
{
118+
code: '<div ...attributes>\n <div>\n <div ...attributes>\n ...\n </div>\n </div>\n</div>\n',
119+
output: null,
120+
errors: [
121+
{
122+
message:
123+
'Do not use ...attributes on nested elements. Only use it on the top-level element of a component.',
124+
},
125+
],
126+
},
127+
],
107128
});

0 commit comments

Comments
 (0)