Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Feb 19, 2024
1 parent 90c2b4b commit 8b6b4c5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dprint_plugin/tests/integration/biome/nested-template.astro.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ source: dprint_plugin/tests/integration.rs
<span></span>
))
}
{condition && <span>B<!-- A HTML comment --></span>}
{
true && (
<script>
const thing = { age: 1 };
</script>
)
}
{
fields.map((field) => (
<p class="instructions">
{"To get started, o"}{"pen the directory"}
{"in your project."}
</p>
))
}
</body>
</html>

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ source: dprint_plugin/tests/integration.rs
<span></span>
))
}
{condition && <span>B<!-- A HTML comment --></span>}
{
true && (
<script>
const thing = { age: 1 };
</script>
)
}
{
fields.map((field) => (
<p class="instructions">
{"To get started, o"}{"pen the directory"}
{"in your project."}
</p>
))
}
</body>
</html>

10 changes: 10 additions & 0 deletions dprint_plugin/tests/integration/nested-template.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@
{[1,2,3].map((n)=><div>{ n }</div><!--comment--><img>)}
{[1,2,3].map((n)=><span>{ n }</span><span></span>)}
{[1,2,3].map((n)=><span>{ n }</span> <span></span>)}
{condition && <span>B<!-- A HTML comment --></span>}
{true && <script>const thing = {age:1}</script>}
{
fields.map((field) => (
<p class="instructions">
{"To get started, o"}{"pen the directory"}
{"in your project."}
</p>
))
}
</body>
</html>

0 comments on commit 8b6b4c5

Please sign in to comment.