prettier/tests/handlebars-block-statement/__snapshots__/jsfmt.spec.js.snap

826 lines
12 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[`each.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<div id="comments">
{{#each comments}}
<h2><a href="/posts/{{permalink}}#{{id}}">{{title}}</a></h2>
<div>{{body}}</div>
{{/each}}
</div>
=====================================output=====================================
<div id="comments">
{{#each comments}}
<h2>
<a href="/posts/{{permalink}}#{{id}}">
{{title}}
</a>
</h2>
<div>
{{body}}
</div>
{{/each}}
</div>
================================================================================
`;
exports[`each.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<div id="comments">
{{#each comments}}
<h2><a href="/posts/{{permalink}}#{{id}}">{{title}}</a></h2>
<div>{{body}}</div>
{{/each}}
</div>
=====================================output=====================================
<div id='comments'>
{{#each comments}}
<h2>
<a href="/posts/{{permalink}}#{{id}}">
{{title}}
</a>
</h2>
<div>
{{body}}
</div>
{{/each}}
</div>
================================================================================
`;
exports[`if-else.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<h1>
{{#if isAtWork}}
Ship that code!
{{else if isReading}}
You can finish War and Peace eventually...
{{else}}
Go to bed!
{{/if}}
</h1>
<h2>
{{#if a}}
A
{{else}}
B
{{/if}}
</h2>
{{#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=====================================
<h1>
{{#if isAtWork}}
Ship that code!
{{else if isReading}}
You can finish War and Peace eventually...
{{else}}
Go to bed!
{{/if}}
</h1>
<h2>
{{#if a}}
A
{{else}}
B
{{/if}}
</h2>
{{#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[`if-else.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<h1>
{{#if isAtWork}}
Ship that code!
{{else if isReading}}
You can finish War and Peace eventually...
{{else}}
Go to bed!
{{/if}}
</h1>
<h2>
{{#if a}}
A
{{else}}
B
{{/if}}
</h2>
{{#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=====================================
<h1>
{{#if isAtWork}}
Ship that code!
{{else if isReading}}
You can finish War and Peace eventually...
{{else}}
Go to bed!
{{/if}}
</h1>
<h2>
{{#if a}}
A
{{else}}
B
{{/if}}
</h2>
{{#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[`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>
================================================================================
`;