prettier/tests/glimmer/__snapshots__/jsfmt.spec.js.snap

1659 lines
35 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`block-statement.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
{{#block param hashKey=hashValue as |blockParam|}}
Hello
{{/block}}
{{#block almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars helloWorldParam key=here}}
{{/block}}
{{#block param param param param param param param hashKey=hashValue as |blockParam|}}
Hello
{{/block}}
{{#block param param param param param param param hashKey=HashValue hashKey=hashValue}}
Hello
{{/block}}
{{#block param param param param param param param param param param param param param}}
Hello
{{/block}}
{{#block hashKey=HashValue hashKey=hashValue hashKey=HashValue hashKey=hashValue hashKey=HashValue}}
Hello
{{/block}}
{{#block}}
{{#block}}
hello
{{/block}}
{{/block}}
{{#block}}
{{#block param}}
hello
{{/block}}
{{/block}}
{{#block param}}
{{#block param}}
hello
{{/block}}
{{/block}}
{{#block}}
hello
{{/block}}
<MyComponent as |firstName|>
{{firstName}}
</MyComponent>
<MyComponent as |firstName lastName|>
{{firstName}} {{lastName}}
</MyComponent>
=====================================output=====================================
{{#block param hashKey=hashValue as |blockParam|}}
Hello
{{/block}}
{{#block
almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars
helloWorldParam
key=here
}}{{/block}}
{{#block
param
param
param
param
param
param
param
hashKey=hashValue as |blockParam|
}}
Hello
{{/block}}
{{#block
param
param
param
param
param
param
param
hashKey=HashValue
hashKey=hashValue
}}
Hello
{{/block}}
{{#block
param
param
param
param
param
param
param
param
param
param
param
param
param
}}
Hello
{{/block}}
{{#block
hashKey=HashValue
hashKey=hashValue
hashKey=HashValue
hashKey=hashValue
hashKey=HashValue
}}
Hello
{{/block}}
{{#block}}
{{#block}}
hello
{{/block}}
{{/block}}
{{#block}}
{{#block param}}
hello
{{/block}}
{{/block}}
{{#block param}}
{{#block param}}
hello
{{/block}}
{{/block}}
{{#block}}
hello
{{/block}}
<MyComponent as |firstName|>
{{firstName}}
</MyComponent>
<MyComponent as |firstName lastName|>
{{firstName}} {{lastName}}
</MyComponent>
================================================================================
`;
exports[`block-statement.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
{{#block param hashKey=hashValue as |blockParam|}}
Hello
{{/block}}
{{#block almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars helloWorldParam key=here}}
{{/block}}
{{#block param param param param param param param hashKey=hashValue as |blockParam|}}
Hello
{{/block}}
{{#block param param param param param param param hashKey=HashValue hashKey=hashValue}}
Hello
{{/block}}
{{#block param param param param param param param param param param param param param}}
Hello
{{/block}}
{{#block hashKey=HashValue hashKey=hashValue hashKey=HashValue hashKey=hashValue hashKey=HashValue}}
Hello
{{/block}}
{{#block}}
{{#block}}
hello
{{/block}}
{{/block}}
{{#block}}
{{#block param}}
hello
{{/block}}
{{/block}}
{{#block param}}
{{#block param}}
hello
{{/block}}
{{/block}}
{{#block}}
hello
{{/block}}
<MyComponent as |firstName|>
{{firstName}}
</MyComponent>
<MyComponent as |firstName lastName|>
{{firstName}} {{lastName}}
</MyComponent>
=====================================output=====================================
{{#block param hashKey=hashValue as |blockParam|}}
Hello
{{/block}}
{{#block
almost80CharacterLongPositionalParamThatIsFirstAlmost80Chars
helloWorldParam
key=here
}}{{/block}}
{{#block
param
param
param
param
param
param
param
hashKey=hashValue as |blockParam|
}}
Hello
{{/block}}
{{#block
param
param
param
param
param
param
param
hashKey=HashValue
hashKey=hashValue
}}
Hello
{{/block}}
{{#block
param
param
param
param
param
param
param
param
param
param
param
param
param
}}
Hello
{{/block}}
{{#block
hashKey=HashValue
hashKey=hashValue
hashKey=HashValue
hashKey=hashValue
hashKey=HashValue
}}
Hello
{{/block}}
{{#block}}
{{#block}}
hello
{{/block}}
{{/block}}
{{#block}}
{{#block param}}
hello
{{/block}}
{{/block}}
{{#block param}}
{{#block param}}
hello
{{/block}}
{{/block}}
{{#block}}
hello
{{/block}}
<MyComponent as |firstName|>
{{firstName}}
</MyComponent>
<MyComponent as |firstName lastName|>
{{firstName}} {{lastName}}
</MyComponent>
================================================================================
`;
exports[`comment.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<div>
{{! Foo }}
{{#if @foo}}
Foo
{{/if}}
{{! Bar }}
{{#if @bar}}
Bar
{{/if}}
</div>
=====================================output=====================================
<div>
{{! Foo }}
{{#if @foo}}
Foo
{{/if}}
{{! Bar }}
{{#if @bar}}
Bar
{{/if}}
</div>
================================================================================
`;
exports[`comment.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<div>
{{! Foo }}
{{#if @foo}}
Foo
{{/if}}
{{! Bar }}
{{#if @bar}}
Bar
{{/if}}
</div>
=====================================output=====================================
<div>
{{! Foo }}
{{#if @foo}}
Foo
{{/if}}
{{! Bar }}
{{#if @bar}}
Bar
{{/if}}
</div>
================================================================================
`;
exports[`component.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<UserGreeting @name="Ricardo" @greeting="Olá" />
{{@greeting}}, {{@name}}!
<div>
<UserGreeting
@aVeryLongArgumentNameThatIsStillGoing={{@alsoAVeryLongArgument}}
/>
</div>
<Form as |f|>
<f.input @title="hello" />
<f.input>hello</f.input>
</Form>
<this.label @title="hello" />
<button onclick={{action next}}>Next</button>
<button disabled class="disabled"></button>
<button disabled=disabled class="disabled"></button>
<img alt="" />
<div ...attributes>Hello</div>
=====================================output=====================================
<UserGreeting @name="Ricardo" @greeting="Olá" />
{{@greeting}}
,
{{@name}}
!
<div>
<UserGreeting
@aVeryLongArgumentNameThatIsStillGoing={{@alsoAVeryLongArgument}}
/>
</div>
<Form as |f|>
<f.input @title="hello" />
<f.input>
hello
</f.input>
</Form>
<this.label @title="hello" />
<button onclick={{action next}}>
Next
</button>
<button disabled class="disabled"></button>
<button disabled="disabled" class="disabled"></button>
<img alt="" />
<div ...attributes>
Hello
</div>
================================================================================
`;
exports[`component.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<UserGreeting @name="Ricardo" @greeting="Olá" />
{{@greeting}}, {{@name}}!
<div>
<UserGreeting
@aVeryLongArgumentNameThatIsStillGoing={{@alsoAVeryLongArgument}}
/>
</div>
<Form as |f|>
<f.input @title="hello" />
<f.input>hello</f.input>
</Form>
<this.label @title="hello" />
<button onclick={{action next}}>Next</button>
<button disabled class="disabled"></button>
<button disabled=disabled class="disabled"></button>
<img alt="" />
<div ...attributes>Hello</div>
=====================================output=====================================
<UserGreeting @name="Ricardo" @greeting="Olá" />
{{@greeting}}
,
{{@name}}
!
<div>
<UserGreeting
@aVeryLongArgumentNameThatIsStillGoing={{@alsoAVeryLongArgument}}
/>
</div>
<Form as |f|>
<f.input @title="hello" />
<f.input>
hello
</f.input>
</Form>
<this.label @title="hello" />
<button onclick={{action next}}>
Next
</button>
<button disabled class="disabled"></button>
<button disabled="disabled" class="disabled"></button>
<img alt="" />
<div ...attributes>
Hello
</div>
================================================================================
`;
exports[`concat-statement.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<div class="hello {{if goodbye true}}">
Hello
</div>
<div class="hello {{if goodbye true}} {{if goodbye false}} {{if goodbye true}} {{if goodbye false}} {{if goodbye true}}">
Hello
</div>
<a href="/{{url}}/{{url}}"></a>
<div class=" class-a{{myClass}}"></div>
<div class=" class-b {{myClass}}"></div>
<div class=" {{myClass}}class-c"></div>
<div class=" {{myClass}} class-d"></div>
<div class=" class-e{{myClass}} class-f"></div>
<div class=" class-g{{myClass}}class-h "></div>
<div class=" class-i {{myClass}}class-j"></div>
<div class="class-k {{myClass}} class-l"></div>
<div class=" class-m {{myClass}} class-n {{myClass}}class-o "></div>
<div class=" class-p class-q"></div>
=====================================output=====================================
<div class="hello {{if goodbye true}}">
Hello
</div>
<div
class="hello
{{if goodbye true}}
{{if goodbye false}}
{{if goodbye true}}
{{if goodbye false}}
{{if goodbye true}}"
>
Hello
</div>
<a href="/{{url}}/{{url}}"></a>
<div class="class-a{{myClass}}"></div>
<div class="class-b {{myClass}}"></div>
<div class="{{myClass}}class-c"></div>
<div class="{{myClass}} class-d"></div>
<div class="class-e{{myClass}} class-f"></div>
<div class="class-g{{myClass}}class-h"></div>
<div class="class-i {{myClass}}class-j"></div>
<div class="class-k {{myClass}} class-l"></div>
<div class="class-m {{myClass}} class-n {{myClass}}class-o"></div>
<div class="class-p class-q"></div>
================================================================================
`;
exports[`concat-statement.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<div class="hello {{if goodbye true}}">
Hello
</div>
<div class="hello {{if goodbye true}} {{if goodbye false}} {{if goodbye true}} {{if goodbye false}} {{if goodbye true}}">
Hello
</div>
<a href="/{{url}}/{{url}}"></a>
<div class=" class-a{{myClass}}"></div>
<div class=" class-b {{myClass}}"></div>
<div class=" {{myClass}}class-c"></div>
<div class=" {{myClass}} class-d"></div>
<div class=" class-e{{myClass}} class-f"></div>
<div class=" class-g{{myClass}}class-h "></div>
<div class=" class-i {{myClass}}class-j"></div>
<div class="class-k {{myClass}} class-l"></div>
<div class=" class-m {{myClass}} class-n {{myClass}}class-o "></div>
<div class=" class-p class-q"></div>
=====================================output=====================================
<div class="hello {{if goodbye true}}">
Hello
</div>
<div
class="hello
{{if goodbye true}}
{{if goodbye false}}
{{if goodbye true}}
{{if goodbye false}}
{{if goodbye true}}"
>
Hello
</div>
<a href="/{{url}}/{{url}}"></a>
<div class="class-a{{myClass}}"></div>
<div class="class-b {{myClass}}"></div>
<div class="{{myClass}}class-c"></div>
<div class="{{myClass}} class-d"></div>
<div class="class-e{{myClass}} class-f"></div>
<div class="class-g{{myClass}}class-h"></div>
<div class="class-i {{myClass}}class-j"></div>
<div class="class-k {{myClass}} class-l"></div>
<div class="class-m {{myClass}} class-n {{myClass}}class-o"></div>
<div class="class-p class-q"></div>
================================================================================
`;
exports[`curly.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<p>Your username is @{{name}}</p>
<p>Hi {{firstName}} {{lastName}}</p>
=====================================output=====================================
<p>
Your username is @{{name}}
</p>
<p>
Hi {{firstName}} {{lastName}}
</p>
================================================================================
`;
exports[`curly.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<p>Your username is @{{name}}</p>
<p>Hi {{firstName}} {{lastName}}</p>
=====================================output=====================================
<p>
Your username is @{{name}}
</p>
<p>
Hi {{firstName}} {{lastName}}
</p>
================================================================================
`;
exports[`element-modifier-statement.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<div {{hello param hash=key}} {{goodbye param}}>
Hello
</div>
<div {{hello param param param param param param param param param param param param}}>
Hello
</div>
<div {{hello hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
Hello
</div>
<div {{hello param param param param hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
Hello
</div>
=====================================output=====================================
<div {{hello param hash=key}} {{goodbye param}}>
Hello
</div>
<div
{{hello
param
param
param
param
param
param
param
param
param
param
param
param
}}
>
Hello
</div>
<div
{{hello
hashPair=value
hashPair=value
hashPair=value
hashPair=value
hashPair=value
}}
>
Hello
</div>
<div
{{hello
param
param
param
param
hashPair=value
hashPair=value
hashPair=value
hashPair=value
hashPair=value
}}
>
Hello
</div>
================================================================================
`;
exports[`element-modifier-statement.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<div {{hello param hash=key}} {{goodbye param}}>
Hello
</div>
<div {{hello param param param param param param param param param param param param}}>
Hello
</div>
<div {{hello hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
Hello
</div>
<div {{hello param param param param hashPair=value hashPair=value hashPair=value hashPair=value hashPair=value}}>
Hello
</div>
=====================================output=====================================
<div {{hello param hash=key}} {{goodbye param}}>
Hello
</div>
<div
{{hello
param
param
param
param
param
param
param
param
param
param
param
param
}}
>
Hello
</div>
<div
{{hello
hashPair=value
hashPair=value
hashPair=value
hashPair=value
hashPair=value
}}
>
Hello
</div>
<div
{{hello
param
param
param
param
hashPair=value
hashPair=value
hashPair=value
hashPair=value
hashPair=value
}}
>
Hello
</div>
================================================================================
`;
exports[`element-node.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<div class="attribute" {{modifier}} {{! comment}}>
Hello
</div>
<div>
Hello
</div>
<div>
hi
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping.
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping more.
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping more and more.
</div>
<div>
{{#block}}
{{hello}}
{{/block}}
</div>
<div>
{{hello}}
</div>
<div></div>
<img />
=====================================output=====================================
<div class="attribute" {{modifier}} {{! comment}}>
Hello
</div>
<div>
Hello
</div>
<div>
hi
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping.
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping more.
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping more and more.
</div>
<div>
{{#block}}
{{hello}}
{{/block}}
</div>
<div>
{{hello}}
</div>
<div></div>
<img />
================================================================================
`;
exports[`element-node.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<div class="attribute" {{modifier}} {{! comment}}>
Hello
</div>
<div>
Hello
</div>
<div>
hi
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping.
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping more.
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping more and more.
</div>
<div>
{{#block}}
{{hello}}
{{/block}}
</div>
<div>
{{hello}}
</div>
<div></div>
<img />
=====================================output=====================================
<div class="attribute" {{modifier}} {{! comment}}>
Hello
</div>
<div>
Hello
</div>
<div>
hi
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping.
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping more.
</div>
<div>
A long enough string to trigger a line break that would prevent wrapping more and more.
</div>
<div>
{{#block}}
{{hello}}
{{/block}}
</div>
<div>
{{hello}}
</div>
<div></div>
<img />
================================================================================
`;
exports[`else-if.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
{{#if a}}
b
{{else if c}}
d
{{else}}
hello
{{#if f}}
g
{{/if}}
e
{{/if}}
{{#if a}}
b
{{else if c}}
d
{{else if e}}
f
{{else if g}}
h
{{else}}
j
{{/if}}
<div>
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
</div>
<div>
<div>
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
</div>
</div>
{{#if a}}
b
{{else}}
{{#each c as |d|}}
e
{{/each}}
{{/if}}
{{#if a}}
{{#if b}}
ab
{{else if c}}
ac
{{/if}}
{{/if}}
{{#if a}}
a
<div>b</div>
c
{{else}}
{{#if c}}
a
b
<div>c</div>
{{/if}}
<div>a</div>
b
c
{{/if}}
=====================================output=====================================
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
{{#if a}}
b
{{else if c}}
d
{{else}}
hello
{{#if f}}
g
{{/if}}
e
{{/if}}
{{#if a}}
b
{{else if c}}
d
{{else if e}}
f
{{else if g}}
h
{{else}}
j
{{/if}}
<div>
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
</div>
<div>
<div>
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
</div>
</div>
{{#if a}}
b
{{else}}
{{#each c as |d|}}
e
{{/each}}
{{/if}}
{{#if a}}
{{#if b}}
ab
{{else if c}}
ac
{{/if}}
{{/if}}
{{#if a}}
a
<div>
b
</div>
c
{{else}}
{{#if c}}
a
b
<div>
c
</div>
{{/if}}
<div>
a
</div>
b
c
{{/if}}
================================================================================
`;
exports[`else-if.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
{{#if a}}
b
{{else if c}}
d
{{else}}
hello
{{#if f}}
g
{{/if}}
e
{{/if}}
{{#if a}}
b
{{else if c}}
d
{{else if e}}
f
{{else if g}}
h
{{else}}
j
{{/if}}
<div>
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
</div>
<div>
<div>
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
</div>
</div>
{{#if a}}
b
{{else}}
{{#each c as |d|}}
e
{{/each}}
{{/if}}
{{#if a}}
{{#if b}}
ab
{{else if c}}
ac
{{/if}}
{{/if}}
{{#if a}}
a
<div>b</div>
c
{{else}}
{{#if c}}
a
b
<div>c</div>
{{/if}}
<div>a</div>
b
c
{{/if}}
=====================================output=====================================
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
{{#if a}}
b
{{else if c}}
d
{{else}}
hello
{{#if f}}
g
{{/if}}
e
{{/if}}
{{#if a}}
b
{{else if c}}
d
{{else if e}}
f
{{else if g}}
h
{{else}}
j
{{/if}}
<div>
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
</div>
<div>
<div>
{{#if a}}
b
{{else if c}}
d
{{else}}
e
{{/if}}
</div>
</div>
{{#if a}}
b
{{else}}
{{#each c as |d|}}
e
{{/each}}
{{/if}}
{{#if a}}
{{#if b}}
ab
{{else if c}}
ac
{{/if}}
{{/if}}
{{#if a}}
a
<div>
b
</div>
c
{{else}}
{{#if c}}
a
b
<div>
c
</div>
{{/if}}
<div>
a
</div>
b
c
{{/if}}
================================================================================
`;
exports[`html-entities.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<p>Some escaped characters: &lt; &gt; &amp;</p>
=====================================output=====================================
<p>
Some escaped characters: &lt; &gt; &amp;
</p>
================================================================================
`;
exports[`html-entities.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<p>Some escaped characters: &lt; &gt; &amp;</p>
=====================================output=====================================
<p>
Some escaped characters: &lt; &gt; &amp;
</p>
================================================================================
`;
exports[`literals.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
{{mustache true}}
{{mustache 5}}
{{mustache undefined}}
{{mustache null}}
<!-- hello world -->
{{! Mustache Comment}}
{{!-- Mustache Comment }} --}}
=====================================output=====================================
{{mustache true}}
{{mustache 5}}
{{mustache undefined}}
{{mustache null}}
<!-- hello world -->
{{! Mustache Comment}}
{{!-- Mustache Comment }} --}}
================================================================================
`;
exports[`literals.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
{{mustache true}}
{{mustache 5}}
{{mustache undefined}}
{{mustache null}}
<!-- hello world -->
{{! Mustache Comment}}
{{!-- Mustache Comment }} --}}
=====================================output=====================================
{{mustache true}}
{{mustache 5}}
{{mustache undefined}}
{{mustache null}}
<!-- hello world -->
{{! Mustache Comment}}
{{!-- Mustache Comment }} --}}
================================================================================
`;
exports[`loop.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<ul>
{{#each speakers key="@index" as |speaker|}}
<li>{{speaker}}</li>
{{/each}}
</ul>
=====================================output=====================================
<ul>
{{#each speakers key="@index" as |speaker|}}
<li>
{{speaker}}
</li>
{{/each}}
</ul>
================================================================================
`;
exports[`loop.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<ul>
{{#each speakers key="@index" as |speaker|}}
<li>{{speaker}}</li>
{{/each}}
</ul>
=====================================output=====================================
<ul>
{{#each speakers key='@index' as |speaker|}}
<li>
{{speaker}}
</li>
{{/each}}
</ul>
================================================================================
`;
exports[`string-literals.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
{{"abc"}}
{{'abc'}}
{{" \\" \\" ' more double quote than single quote "}}
{{' \\' \\' " more single quote than double quote '}}
{{' " \\' \\" \\\\ '}}
{{" \\" \\' ' \\\\ "}}
=====================================output=====================================
{{"abc"}}
{{"abc"}}
{{' " " \\' more double quote than single quote '}}
{{" ' ' \\" more single quote than double quote "}}
{{' " \\' \\" \\\\ '}}
{{" \\" \\' ' \\\\ "}}
================================================================================
`;
exports[`string-literals.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
{{"abc"}}
{{'abc'}}
{{" \\" \\" ' more double quote than single quote "}}
{{' \\' \\' " more single quote than double quote '}}
{{' " \\' \\" \\\\ '}}
{{" \\" \\' ' \\\\ "}}
=====================================output=====================================
{{'abc'}}
{{'abc'}}
{{' " " \\' more double quote than single quote '}}
{{" ' ' \\" more single quote than double quote "}}
{{' " \\' \\" \\\\ '}}
{{" \\" \\' ' \\\\ "}}
================================================================================
`;
exports[`sub-expressions.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<div
{{mustache
(concat
(service)
(helper param hashPair=Value)
(largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
hashPair=(does not need a line break due to being under 80 chars long)
)
}}
></div>
{{#block
(concat
(service)
(helper param hashPair=Value)
(largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
hashPair=(does not need a line break due to being under 80 chars long)
)
}}
{{/block}}
{{foobar-sub-component/foobar-foo
hook="stringLiteral"
foo=
(t
(concat "stringLiteral" (get blockParam "stringLiteral") hash=hash hash=hash)
foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
)
}}
=====================================output=====================================
<div
{{mustache
(concat
(service)
(helper param hashPair=Value)
(largeNameHelper
param param param param hashPair=value hashPair=value hashPair=Value
)
hashPair=(helper
param
param
param
param
param
param
hashPair=value
hashPair=value
hashPair=value
)
hashPair=(does not need a line break due to being under 80 chars long)
)
}}
></div>
{{#block
(concat
(service)
(helper param hashPair=Value)
(largeNameHelper
param param param param hashPair=value hashPair=value hashPair=Value
)
hashPair=(helper
param
param
param
param
param
param
hashPair=value
hashPair=value
hashPair=value
)
hashPair=(does not need a line break due to being under 80 chars long)
)
}}{{/block}}
{{foobar-sub-component/foobar-foo
hook="stringLiteral"
foo=(t
(concat
"stringLiteral" (get blockParam "stringLiteral") hash=hash hash=hash
)
foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
)
}}
================================================================================
`;
exports[`sub-expressions.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<div
{{mustache
(concat
(service)
(helper param hashPair=Value)
(largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
hashPair=(does not need a line break due to being under 80 chars long)
)
}}
></div>
{{#block
(concat
(service)
(helper param hashPair=Value)
(largeNameHelper param param param param hashPair=value hashPair=value hashPair=Value)
hashPair=(helper param param param param param param hashPair=value hashPair=value hashPair=value)
hashPair=(does not need a line break due to being under 80 chars long)
)
}}
{{/block}}
{{foobar-sub-component/foobar-foo
hook="stringLiteral"
foo=
(t
(concat "stringLiteral" (get blockParam "stringLiteral") hash=hash hash=hash)
foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
)
}}
=====================================output=====================================
<div
{{mustache
(concat
(service)
(helper param hashPair=Value)
(largeNameHelper
param param param param hashPair=value hashPair=value hashPair=Value
)
hashPair=(helper
param
param
param
param
param
param
hashPair=value
hashPair=value
hashPair=value
)
hashPair=(does not need a line break due to being under 80 chars long)
)
}}
></div>
{{#block
(concat
(service)
(helper param hashPair=Value)
(largeNameHelper
param param param param hashPair=value hashPair=value hashPair=Value
)
hashPair=(helper
param
param
param
param
param
param
hashPair=value
hashPair=value
hashPair=value
)
hashPair=(does not need a line break due to being under 80 chars long)
)
}}{{/block}}
{{foobar-sub-component/foobar-foo
hook='stringLiteral'
foo=(t
(concat
'stringLiteral' (get blockParam 'stringLiteral') hash=hash hash=hash
)
foo=(simple-helper (hash hashKey=blockParam.foo assignParam=blockParam.bar))
)
}}
================================================================================
`;