diff --git a/tests/v2-test/astro/prettier-ignore/1tbs.test.ts b/tests/v2-test/astro/prettier-ignore/1tbs.test.ts index fa5edbe..c51dc88 100644 --- a/tests/v2-test/astro/prettier-ignore/1tbs.test.ts +++ b/tests/v2-test/astro/prettier-ignore/1tbs.test.ts @@ -158,6 +158,68 @@ else } +`, + }, + { + name: 'ignore comment (4)', + input: ` +
+ +
+ +
+
+ +
+
+`, + output: `
+ +
+ +
+
+ +
+
`, }, { diff --git a/tests/v2-test/astro/prettier-ignore/allman.test.ts b/tests/v2-test/astro/prettier-ignore/allman.test.ts index 2ba1d3a..5bb6977 100644 --- a/tests/v2-test/astro/prettier-ignore/allman.test.ts +++ b/tests/v2-test/astro/prettier-ignore/allman.test.ts @@ -158,6 +158,73 @@ else } +`, + }, + { + name: 'ignore comment (4)', + input: ` +
+ +
+ +
+
+ +
+
+`, + output: `
+ +
+ +
+
+ +
+
`, }, { diff --git a/tests/v2-test/astro/prettier-ignore/stroustrup.test.ts b/tests/v2-test/astro/prettier-ignore/stroustrup.test.ts index c301e09..5af2dc7 100644 --- a/tests/v2-test/astro/prettier-ignore/stroustrup.test.ts +++ b/tests/v2-test/astro/prettier-ignore/stroustrup.test.ts @@ -158,6 +158,70 @@ else } +`, + }, + { + name: 'ignore comment (4)', + input: ` +
+ +
+ +
+
+ +
+
+`, + output: `
+ +
+ +
+
+ +
+
`, }, { diff --git a/tests/v2-test/astro/script/1tbs.test.ts b/tests/v2-test/astro/script/1tbs.test.ts deleted file mode 100644 index 77003cd..0000000 --- a/tests/v2-test/astro/script/1tbs.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { format } from 'prettier'; -import type { Fixture } from 'test-settings'; -import { baseOptions } from 'test-settings'; -import { describe, expect, test } from 'vitest'; - -// eslint-disable-next-line import/no-extraneous-dependencies -import * as thisPlugin from '@/packages/v2-plugin'; - -const options = { - ...baseOptions, - plugins: ['prettier-plugin-astro', thisPlugin], - parser: 'astro', - braceStyle: '1tbs', -}; - -const fixtures: Fixture[] = [ - { - name: '`is:inline` directive', - input: ` - -`, - output: ` -`, - }, -]; - -describe('astro/script/1tbs', () => { - for (const fixture of fixtures) { - test(fixture.name, () => { - expect( - format(fixture.input, { - ...options, - ...(fixture.options ?? {}), - }), - ).toBe(fixture.output); - }); - } -}); diff --git a/tests/v2-test/astro/script/allman.test.ts b/tests/v2-test/astro/script/allman.test.ts deleted file mode 100644 index 7a444e9..0000000 --- a/tests/v2-test/astro/script/allman.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { format } from 'prettier'; -import type { Fixture } from 'test-settings'; -import { baseOptions } from 'test-settings'; -import { describe, expect, test } from 'vitest'; - -// eslint-disable-next-line import/no-extraneous-dependencies -import * as thisPlugin from '@/packages/v2-plugin'; - -const options = { - ...baseOptions, - plugins: ['prettier-plugin-astro', thisPlugin], - parser: 'astro', - braceStyle: 'allman', -}; - -const fixtures: Fixture[] = [ - { - name: '`is:inline` directive', - input: ` - -`, - output: ` -`, - }, -]; - -describe('astro/script/allman', () => { - for (const fixture of fixtures) { - test(fixture.name, () => { - expect( - format(fixture.input, { - ...options, - ...(fixture.options ?? {}), - }), - ).toBe(fixture.output); - }); - } -}); diff --git a/tests/v2-test/astro/script/stroustrup.test.ts b/tests/v2-test/astro/script/stroustrup.test.ts deleted file mode 100644 index 1cd26c7..0000000 --- a/tests/v2-test/astro/script/stroustrup.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { format } from 'prettier'; -import type { Fixture } from 'test-settings'; -import { baseOptions } from 'test-settings'; -import { describe, expect, test } from 'vitest'; - -// eslint-disable-next-line import/no-extraneous-dependencies -import * as thisPlugin from '@/packages/v2-plugin'; - -const options = { - ...baseOptions, - plugins: ['prettier-plugin-astro', thisPlugin], - parser: 'astro', - braceStyle: 'stroustrup', -}; - -const fixtures: Fixture[] = [ - { - name: '`is:inline` directive', - input: ` - -`, - output: ` -`, - }, -]; - -describe('astro/script/stroustrup', () => { - for (const fixture of fixtures) { - test(fixture.name, () => { - expect( - format(fixture.input, { - ...options, - ...(fixture.options ?? {}), - }), - ).toBe(fixture.output); - }); - } -}); diff --git a/tests/v3-test/astro/prettier-ignore/1tbs.test.ts b/tests/v3-test/astro/prettier-ignore/1tbs.test.ts index 93a96aa..ed33a9e 100644 --- a/tests/v3-test/astro/prettier-ignore/1tbs.test.ts +++ b/tests/v3-test/astro/prettier-ignore/1tbs.test.ts @@ -158,6 +158,68 @@ else } +`, + }, + { + name: 'ignore comment (4)', + input: ` +
+ +
+ +
+
+ +
+
+`, + output: `
+ +
+ +
+
+ +
+
`, }, { diff --git a/tests/v3-test/astro/prettier-ignore/allman.test.ts b/tests/v3-test/astro/prettier-ignore/allman.test.ts index 379ad8e..332650b 100644 --- a/tests/v3-test/astro/prettier-ignore/allman.test.ts +++ b/tests/v3-test/astro/prettier-ignore/allman.test.ts @@ -158,6 +158,73 @@ else } +`, + }, + { + name: 'ignore comment (4)', + input: ` +
+ +
+ +
+
+ +
+
+`, + output: `
+ +
+ +
+
+ +
+
`, }, { diff --git a/tests/v3-test/astro/prettier-ignore/stroustrup.test.ts b/tests/v3-test/astro/prettier-ignore/stroustrup.test.ts index ddbd48c..18d5f08 100644 --- a/tests/v3-test/astro/prettier-ignore/stroustrup.test.ts +++ b/tests/v3-test/astro/prettier-ignore/stroustrup.test.ts @@ -158,6 +158,70 @@ else } +`, + }, + { + name: 'ignore comment (4)', + input: ` +
+ +
+ +
+
+ +
+
+`, + output: `
+ +
+ +
+
+ +
+
`, }, { diff --git a/tests/v3-test/astro/script/1tbs.test.ts b/tests/v3-test/astro/script/1tbs.test.ts deleted file mode 100644 index b7946ec..0000000 --- a/tests/v3-test/astro/script/1tbs.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { format } from 'prettier'; -import type { Fixture } from 'test-settings'; -import { baseOptions } from 'test-settings'; -import { describe, expect, test } from 'vitest'; - -// eslint-disable-next-line import/no-extraneous-dependencies -import * as thisPlugin from '@/packages/v3-plugin'; - -const options = { - ...baseOptions, - plugins: ['prettier-plugin-astro', thisPlugin], - parser: 'astro', - braceStyle: '1tbs', -}; - -const fixtures: Fixture[] = [ - { - name: '`is:inline` directive', - input: ` - -`, - output: ` -`, - }, -]; - -describe('astro/script/1tbs', () => { - for (const fixture of fixtures) { - test(fixture.name, async () => { - expect( - await format(fixture.input, { - ...options, - ...(fixture.options ?? {}), - }), - ).toBe(fixture.output); - }); - } -}); diff --git a/tests/v3-test/astro/script/allman.test.ts b/tests/v3-test/astro/script/allman.test.ts deleted file mode 100644 index cc86615..0000000 --- a/tests/v3-test/astro/script/allman.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { format } from 'prettier'; -import type { Fixture } from 'test-settings'; -import { baseOptions } from 'test-settings'; -import { describe, expect, test } from 'vitest'; - -// eslint-disable-next-line import/no-extraneous-dependencies -import * as thisPlugin from '@/packages/v3-plugin'; - -const options = { - ...baseOptions, - plugins: ['prettier-plugin-astro', thisPlugin], - parser: 'astro', - braceStyle: 'allman', -}; - -const fixtures: Fixture[] = [ - { - name: '`is:inline` directive', - input: ` - -`, - output: ` -`, - }, -]; - -describe('astro/script/allman', () => { - for (const fixture of fixtures) { - test(fixture.name, async () => { - expect( - await format(fixture.input, { - ...options, - ...(fixture.options ?? {}), - }), - ).toBe(fixture.output); - }); - } -}); diff --git a/tests/v3-test/astro/script/stroustrup.test.ts b/tests/v3-test/astro/script/stroustrup.test.ts deleted file mode 100644 index 75a86cc..0000000 --- a/tests/v3-test/astro/script/stroustrup.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { format } from 'prettier'; -import type { Fixture } from 'test-settings'; -import { baseOptions } from 'test-settings'; -import { describe, expect, test } from 'vitest'; - -// eslint-disable-next-line import/no-extraneous-dependencies -import * as thisPlugin from '@/packages/v3-plugin'; - -const options = { - ...baseOptions, - plugins: ['prettier-plugin-astro', thisPlugin], - parser: 'astro', - braceStyle: 'stroustrup', -}; - -const fixtures: Fixture[] = [ - { - name: '`is:inline` directive', - input: ` - -`, - output: ` -`, - }, -]; - -describe('astro/script/stroustrup', () => { - for (const fixture of fixtures) { - test(fixture.name, async () => { - expect( - await format(fixture.input, { - ...options, - ...(fixture.options ?? {}), - }), - ).toBe(fixture.output); - }); - } -});