Skip to content

Commit

Permalink
refactor: include script test into prettier-ignore test
Browse files Browse the repository at this point in the history
  • Loading branch information
ony3000 committed Mar 2, 2024
1 parent 194f8f6 commit 18e42ee
Show file tree
Hide file tree
Showing 12 changed files with 386 additions and 314 deletions.
62 changes: 62 additions & 0 deletions tests/v2-test/astro/prettier-ignore/1tbs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,68 @@ else
}
</script>
</div>
`,
},
{
name: 'ignore comment (4)',
input: `
<div>
<!-- prettier-ignore -->
<div>
<script is:inline>
if (condition1) {
foo
} else if (condition2) {
bar
}
else
{
baz
}
</script>
</div>
<div>
<script is:inline>
if (condition1) {
foo
} else if (condition2) {
bar
}
else
{
baz
}
</script>
</div>
</div>
`,
output: `<div>
<!-- prettier-ignore -->
<div>
<script is:inline>
if (condition1) {
foo
} else if (condition2) {
bar
}
else
{
baz
}
</script>
</div>
<div>
<script is:inline>
if (condition1) {
foo;
} else if (condition2) {
bar;
} else {
baz;
}
</script>
</div>
</div>
`,
},
{
Expand Down
67 changes: 67 additions & 0 deletions tests/v2-test/astro/prettier-ignore/allman.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,73 @@ else
}
</script>
</div>
`,
},
{
name: 'ignore comment (4)',
input: `
<div>
<!-- prettier-ignore -->
<div>
<script is:inline>
if (condition1) {
foo
} else if (condition2) {
bar
}
else
{
baz
}
</script>
</div>
<div>
<script is:inline>
if (condition1) {
foo
} else if (condition2) {
bar
}
else
{
baz
}
</script>
</div>
</div>
`,
output: `<div>
<!-- prettier-ignore -->
<div>
<script is:inline>
if (condition1) {
foo
} else if (condition2) {
bar
}
else
{
baz
}
</script>
</div>
<div>
<script is:inline>
if (condition1)
{
foo;
}
else if (condition2)
{
bar;
}
else
{
baz;
}
</script>
</div>
</div>
`,
},
{
Expand Down
64 changes: 64 additions & 0 deletions tests/v2-test/astro/prettier-ignore/stroustrup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,70 @@ else
}
</script>
</div>
`,
},
{
name: 'ignore comment (4)',
input: `
<div>
<!-- prettier-ignore -->
<div>
<script is:inline>
if (condition1) {
foo
} else if (condition2) {
bar
}
else
{
baz
}
</script>
</div>
<div>
<script is:inline>
if (condition1) {
foo
} else if (condition2) {
bar
}
else
{
baz
}
</script>
</div>
</div>
`,
output: `<div>
<!-- prettier-ignore -->
<div>
<script is:inline>
if (condition1) {
foo
} else if (condition2) {
bar
}
else
{
baz
}
</script>
</div>
<div>
<script is:inline>
if (condition1) {
foo;
}
else if (condition2) {
bar;
}
else {
baz;
}
</script>
</div>
</div>
`,
},
{
Expand Down
51 changes: 0 additions & 51 deletions tests/v2-test/astro/script/1tbs.test.ts

This file was deleted.

54 changes: 0 additions & 54 deletions tests/v2-test/astro/script/allman.test.ts

This file was deleted.

52 changes: 0 additions & 52 deletions tests/v2-test/astro/script/stroustrup.test.ts

This file was deleted.

Loading

0 comments on commit 18e42ee

Please sign in to comment.