prettier/tests/handlebars-basics/__snapshots__/jsfmt.spec.js.snap

396 lines
10 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`basic-handlebars.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<script id="entry-template" type="text/x-handlebars-template">
<div class="entry">
<h1>{{title}}</h1>
<div class="body">
{{body}}
</div>
</div>
</script>
<div class="{{hello}} {{world}}"></div>
=====================================output=====================================
<script id="entry-template" type="text/x-handlebars-template">
<div class="entry">
<h1>
{{title}}
</h1>
<div class="body">
{{body}}
</div>
</div>
</script>
<div class="{{hello}} {{world}}"></div>
================================================================================
`;
exports[`basic-handlebars.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<script id="entry-template" type="text/x-handlebars-template">
<div class="entry">
<h1>{{title}}</h1>
<div class="body">
{{body}}
</div>
</div>
</script>
<div class="{{hello}} {{world}}"></div>
=====================================output=====================================
<script id='entry-template' type='text/x-handlebars-template'>
<div class='entry'>
<h1>
{{title}}
</h1>
<div class='body'>
{{body}}
</div>
</div>
</script>
<div class="{{hello}} {{world}}"></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[`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[`nested-path.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<div class="entry">
<h1>{{title}}</h1>
<h2>By {{author.name}}</h2>
<div class="body">
{{body}}
</div>
</div>
=====================================output=====================================
<div class="entry">
<h1>
{{title}}
</h1>
<h2>
By {{author.name}}
</h2>
<div class="body">
{{body}}
</div>
</div>
================================================================================
`;
exports[`nested-path.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<div class="entry">
<h1>{{title}}</h1>
<h2>By {{author.name}}</h2>
<div class="body">
{{body}}
</div>
</div>
=====================================output=====================================
<div class='entry'>
<h1>
{{title}}
</h1>
<h2>
By {{author.name}}
</h2>
<div class='body'>
{{body}}
</div>
</div>
================================================================================
`;
exports[`raw.hbs 1`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
| printWidth
=====================================input======================================
<p>{{{raw}}}</p>
=====================================output=====================================
<p>
{{{raw}}}
</p>
================================================================================
`;
exports[`raw.hbs 2`] = `
====================================options=====================================
parsers: ["glimmer"]
printWidth: 80
singleQuote: true
| printWidth
=====================================input======================================
<p>{{{raw}}}</p>
=====================================output=====================================
<p>
{{{raw}}}
</p>
================================================================================
`;
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 "}}
{{' " \\' \\" \\\\ '}}
{{" \\" \\' ' \\\\ "}}
================================================================================
`;