From c4fef760f1db83d4f776a2a2bd14a1268d81b354 Mon Sep 17 00:00:00 2001 From: Eric Kelly <602204+HeroicEric@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:16:15 -0700 Subject: [PATCH] Failing test for unicode character issue --- ...component-class-with-unicode-character.gts | 22 +++++++++++++++++ .../__snapshots__/format.test.ts.snap | 24 +++++++++++++++++++ .../__snapshots__/semi-false.test.ts.snap | 24 +++++++++++++++++++ .../template-export-default.test.ts.snap | 24 +++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 tests/cases/gts/component-class-with-unicode-character.gts diff --git a/tests/cases/gts/component-class-with-unicode-character.gts b/tests/cases/gts/component-class-with-unicode-character.gts new file mode 100644 index 00000000..9e127d60 --- /dev/null +++ b/tests/cases/gts/component-class-with-unicode-character.gts @@ -0,0 +1,22 @@ +import Component from '@glimmer/component'; + +export interface Signature { + Element: HTMLElement, + Args: {} + Yields: [] +} + +/** It's a component */ +class MyComponent extends Component { + +} + +function hello() { + return 'Hello'; +} + +function world() { + return 'World'; +} \ No newline at end of file diff --git a/tests/unit-tests/__snapshots__/format.test.ts.snap b/tests/unit-tests/__snapshots__/format.test.ts.snap index 6e57f9c6..28b8bfc1 100644 --- a/tests/unit-tests/__snapshots__/format.test.ts.snap +++ b/tests/unit-tests/__snapshots__/format.test.ts.snap @@ -401,6 +401,30 @@ class MyComponent extends Component { " `; +exports[`format > config > default > it formats ../cases/gts/component-class-with-unicode-character.gts 1`] = ` +"import Component from "@glimmer/component"; + +export interface Signature { + Element: HTMLElement; + Args: {}; + Yields: []; +} + +/** It's a component */ +class MyComponent extends Component { + +} + +function hello() { + return "Hello"; +} + +function world() { + return "World"; +} +" +`; + exports[`format > config > default > it formats ../cases/gts/default-export.gts 1`] = ` "import type { TemplateOnlyComponent } from "@ember/component/template-only"; diff --git a/tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap b/tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap index 810a38b4..7b3e41ba 100644 --- a/tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap +++ b/tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap @@ -401,6 +401,30 @@ class MyComponent extends Component { " `; +exports[`config > semi: false > it formats ../cases/gts/component-class-with-unicode-character.gts 1`] = ` +"import Component from "@glimmer/component" + +export interface Signature { + Element: HTMLElement + Args: {} + Yields: [] +} + +/** It's a component */ +class MyComponent extends Component { + +} + +function hello() { + return "Hello" +} + +function world() { + return "World" +} +" +`; + exports[`config > semi: false > it formats ../cases/gts/default-export.gts 1`] = ` "import type { TemplateOnlyComponent } from "@ember/component/template-only" diff --git a/tests/unit-tests/config/__snapshots__/template-export-default.test.ts.snap b/tests/unit-tests/config/__snapshots__/template-export-default.test.ts.snap index 9fda1d82..ad782ca4 100644 --- a/tests/unit-tests/config/__snapshots__/template-export-default.test.ts.snap +++ b/tests/unit-tests/config/__snapshots__/template-export-default.test.ts.snap @@ -401,6 +401,30 @@ class MyComponent extends Component { " `; +exports[`config > templateExportDefault: true > it formats ../cases/gts/component-class-with-unicode-character.gts 1`] = ` +"import Component from "@glimmer/component"; + +export interface Signature { + Element: HTMLElement; + Args: {}; + Yields: []; +} + +/** It's a component */ +class MyComponent extends Component { + +} + +function hello() { + return "Hello"; +} + +function world() { + return "World"; +} +" +`; + exports[`config > templateExportDefault: true > it formats ../cases/gts/default-export.gts 1`] = ` "import type { TemplateOnlyComponent } from "@ember/component/template-only";