* Do not add hard linebreak for html template * Collapse whitespaces to single space char * restore line breaking * use `line` and rename vars * add test * support htmlWhitespaceSensitivity * indent if breakable * add htmlWhitespaceSensitivity test * indent only when multiple top levels * add a changelog entry * update snapshot * replace match with test * split tests into multiple files for better readability of snapshots * fix an edge case with html-in-js-in-html Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
95 lines
1.9 KiB
Plaintext
95 lines
1.9 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`test.component.ts 1`] = `
|
|
====================================options=====================================
|
|
parsers: ["typescript"]
|
|
printWidth: 80
|
|
trailingComma: "none"
|
|
| printWidth
|
|
=====================================input======================================
|
|
@Component({
|
|
selector: 'app-test',
|
|
template: \`<ul> <li>test</li>
|
|
</ul>
|
|
\`,
|
|
styles: [ \`
|
|
|
|
:host {
|
|
color: red;
|
|
}
|
|
div { background: blue
|
|
}
|
|
\`
|
|
|
|
]
|
|
})
|
|
class TestComponent {}
|
|
|
|
=====================================output=====================================
|
|
@Component({
|
|
selector: "app-test",
|
|
template: \`<ul>
|
|
<li>test</li>
|
|
</ul> \`,
|
|
styles: [
|
|
\`
|
|
:host {
|
|
color: red;
|
|
}
|
|
div {
|
|
background: blue;
|
|
}
|
|
\`
|
|
]
|
|
})
|
|
class TestComponent {}
|
|
|
|
================================================================================
|
|
`;
|
|
|
|
exports[`test.component.ts 2`] = `
|
|
====================================options=====================================
|
|
parsers: ["typescript"]
|
|
printWidth: 80
|
|
| printWidth
|
|
=====================================input======================================
|
|
@Component({
|
|
selector: 'app-test',
|
|
template: \`<ul> <li>test</li>
|
|
</ul>
|
|
\`,
|
|
styles: [ \`
|
|
|
|
:host {
|
|
color: red;
|
|
}
|
|
div { background: blue
|
|
}
|
|
\`
|
|
|
|
]
|
|
})
|
|
class TestComponent {}
|
|
|
|
=====================================output=====================================
|
|
@Component({
|
|
selector: "app-test",
|
|
template: \`<ul>
|
|
<li>test</li>
|
|
</ul> \`,
|
|
styles: [
|
|
\`
|
|
:host {
|
|
color: red;
|
|
}
|
|
div {
|
|
background: blue;
|
|
}
|
|
\`,
|
|
],
|
|
})
|
|
class TestComponent {}
|
|
|
|
================================================================================
|
|
`;
|