WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 7b93db3

Browse files
committed
test: update
1 parent 10965fa commit 7b93db3

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

tests/lib/rules/no-multi-spaces.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,64 @@ ruleTester.run('no-multi-spaces', rule, {
362362
}
363363
]
364364
},
365+
{
366+
code: `
367+
<template>
368+
<div
369+
:class="{
370+
'foo': foo // comment
371+
}"
372+
></div>
373+
</template>
374+
`,
375+
output: `
376+
<template>
377+
<div
378+
:class="{
379+
'foo': foo // comment
380+
}"
381+
></div>
382+
</template>
383+
`,
384+
errors: [
385+
{
386+
message: "Multiple spaces found before '// comment'.",
387+
line: 5,
388+
column: 23,
389+
endLine: 5,
390+
endColumn: 25
391+
}
392+
]
393+
},
394+
{
395+
code: `
396+
<template>
397+
<div
398+
:class="{
399+
'foo': foo /* multiline comment */
400+
}"
401+
></div>
402+
</template>
403+
`,
404+
output: `
405+
<template>
406+
<div
407+
:class="{
408+
'foo': foo /* multiline comment */
409+
}"
410+
></div>
411+
</template>
412+
`,
413+
errors: [
414+
{
415+
message: "Multiple spaces found before '/* multiline comment */'.",
416+
line: 5,
417+
column: 23,
418+
endLine: 5,
419+
endColumn: 25
420+
}
421+
]
422+
},
365423
{
366424
code: `
367425
<template>

0 commit comments

Comments
 (0)