From 33e92eb37ab28dd3f83dbc8c5fc966b3946991f4 Mon Sep 17 00:00:00 2001 From: Shinigami92 Date: Wed, 20 Sep 2023 19:06:21 +0200 Subject: [PATCH] issue-468 --- tests/issues/issue-468/formatted.svelte | 3 +++ tests/issues/issue-468/issue-468.test.ts | 15 +++++++++++++++ tests/issues/issue-468/unformatted.svelte | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 tests/issues/issue-468/formatted.svelte create mode 100644 tests/issues/issue-468/issue-468.test.ts create mode 100644 tests/issues/issue-468/unformatted.svelte diff --git a/tests/issues/issue-468/formatted.svelte b/tests/issues/issue-468/formatted.svelte new file mode 100644 index 00000000..f11db32a --- /dev/null +++ b/tests/issues/issue-468/formatted.svelte @@ -0,0 +1,3 @@ + diff --git a/tests/issues/issue-468/issue-468.test.ts b/tests/issues/issue-468/issue-468.test.ts new file mode 100644 index 00000000..04e0f694 --- /dev/null +++ b/tests/issues/issue-468/issue-468.test.ts @@ -0,0 +1,15 @@ +import { compareFiles } from 'tests/common'; +import { describe, expect, it } from 'vitest'; + +describe('Issues', () => { + it('should end with newline in svelte', async () => { + const { actual, expected } = await compareFiles(import.meta.url, { + source: 'unformatted.svelte', + target: 'formatted.svelte', + formatOptions: { + pugFramework: 'svelte', + }, + }); + expect(actual).toBe(expected); + }); +}); diff --git a/tests/issues/issue-468/unformatted.svelte b/tests/issues/issue-468/unformatted.svelte new file mode 100644 index 00000000..f11db32a --- /dev/null +++ b/tests/issues/issue-468/unformatted.svelte @@ -0,0 +1,3 @@ +