@@ -91,6 +91,8 @@ ruleTester.run('max-attributes-per-line', rule, {
9191 invalid : [
9292 {
9393 code : `<template><component name="John Doe" age="30"></component></template>` ,
94+ output : `<template><component name="John Doe"
95+ age="30"></component></template>` ,
9496 errors : [ 'Attribute "age" should be on a new line.' ]
9597 } ,
9698 {
@@ -99,6 +101,12 @@ ruleTester.run('max-attributes-per-line', rule, {
99101 age="30">
100102 </component>
101103 </template>` ,
104+ output : `<template><component
105+ job="Vet"
106+ name="John Doe"
107+ age="30">
108+ </component>
109+ </template>` ,
102110 errors : [ {
103111 message : 'Attribute "job" should be on a new line.' ,
104112 type : 'VAttribute' ,
@@ -108,6 +116,8 @@ ruleTester.run('max-attributes-per-line', rule, {
108116 {
109117 code : `<template><component name="John Doe" age="30" job="Vet"></component></template>` ,
110118 options : [ { singleline : { max : 2 } } ] ,
119+ output : `<template><component name="John Doe" age="30"
120+ job="Vet"></component></template>` ,
111121 errors : [ {
112122 message : 'Attribute "job" should be on a new line.' ,
113123 type : 'VAttribute' ,
@@ -117,6 +127,8 @@ ruleTester.run('max-attributes-per-line', rule, {
117127 {
118128 code : `<template><component name="John Doe" age="30" job="Vet"></component></template>` ,
119129 options : [ { singleline : 1 , multiline : { max : 1 , allowFirstLine : false } } ] ,
130+ output : `<template><component name="John Doe"
131+ age="30" job="Vet"></component></template>` ,
120132 errors : [ {
121133 message : 'Attribute "age" should be on a new line.' ,
122134 type : 'VAttribute' ,
@@ -133,6 +145,11 @@ ruleTester.run('max-attributes-per-line', rule, {
133145 </component>
134146 </template>` ,
135147 options : [ { singleline : 3 , multiline : { max : 1 , allowFirstLine : false } } ] ,
148+ output : `<template><component
149+ name="John Doe"
150+ age="30">
151+ </component>
152+ </template>` ,
136153 errors : [ {
137154 message : 'Attribute "name" should be on a new line.' ,
138155 type : 'VAttribute' ,
@@ -146,6 +163,12 @@ ruleTester.run('max-attributes-per-line', rule, {
146163 </component>
147164 </template>` ,
148165 options : [ { singleline : 3 , multiline : { max : 1 , allowFirstLine : false } } ] ,
166+ output : `<template><component
167+ name="John Doe"
168+ age="30"
169+ job="Vet">
170+ </component>
171+ </template>` ,
149172 errors : [ {
150173 message : 'Attribute "age" should be on a new line.' ,
151174 type : 'VAttribute' ,
@@ -159,6 +182,12 @@ ruleTester.run('max-attributes-per-line', rule, {
159182 </component>
160183 </template>` ,
161184 options : [ { singleline : 3 , multiline : 1 } ] ,
185+ output : `<template><component
186+ name="John Doe"
187+ age="30"
188+ job="Vet">
189+ </component>
190+ </template>` ,
162191 errors : [ {
163192 message : 'Attribute "age" should be on a new line.' ,
164193 type : 'VAttribute' ,
@@ -172,6 +201,12 @@ ruleTester.run('max-attributes-per-line', rule, {
172201 </component>
173202 </template>` ,
174203 options : [ { singleline : 3 , multiline : { max : 2 , allowFirstLine : false } } ] ,
204+ output : `<template><component
205+ name="John Doe" age="30"
206+ job="Vet" pet="dog"
207+ petname="Snoopy">
208+ </component>
209+ </template>` ,
175210 errors : [ {
176211 message : 'Attribute "petname" should be on a new line.' ,
177212 type : 'VAttribute' ,
@@ -185,6 +220,12 @@ ruleTester.run('max-attributes-per-line', rule, {
185220 </component>
186221 </template>` ,
187222 options : [ { singleline : 3 , multiline : { max : 2 , allowFirstLine : false } } ] ,
223+ output : `<template><component
224+ name="John Doe" age="30"
225+ job="Vet" pet="dog"
226+ petname="Snoopy" extra="foo">
227+ </component>
228+ </template>` ,
188229 errors : [ {
189230 message : 'Attribute "petname" should be on a new line.' ,
190231 type : 'VAttribute' ,
0 commit comments