Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tests/cases/gts/component-class-with-unicode-character.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Component from '@glimmer/component';

export interface Signature {
Element: HTMLElement,
Args: {}
Yields: []
}

/** It's a component */
class MyComponent extends Component<Signature> {
<template>
</template>
}

function hello() {
return 'Hello';
}

function world() {
return 'World';
}
24 changes: 24 additions & 0 deletions tests/unit-tests/__snapshots__/format.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,30 @@ class MyComponent extends Component<Signature> {
"
`;

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<Signature> {
<template>✓</template>
}

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";

Expand Down
24 changes: 24 additions & 0 deletions tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,30 @@ class MyComponent extends Component<Signature> {
"
`;

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<Signature> {
<template>✓</template>
}

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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,30 @@ class MyComponent extends Component<Signature> {
"
`;

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<Signature> {
<template>✓</template>
}

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";

Expand Down